[oe-commits] Chris Larson : oe.path: also rmtree on EPERM
git version control
git at git.openembedded.org
Mon Nov 8 15:08:09 UTC 2010
Module: openembedded.git
Branch: darwin
Commit: bbe3dc4506c604a24010b4aeb8c3deee760fd7ae
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=bbe3dc4506c604a24010b4aeb8c3deee760fd7ae
Author: Chris Larson <chris_larson at mentor.com>
Date: Wed Nov 3 13:44:08 2010 -0700
oe.path: also rmtree on EPERM
Ran into this under OSX for some reason.
Signed-off-by: Chris Larson <chris_larson at mentor.com>
---
lib/oe/path.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/oe/path.py b/lib/oe/path.py
index 65b438a..be8a0c9 100644
--- a/lib/oe/path.py
+++ b/lib/oe/path.py
@@ -49,7 +49,7 @@ def remove(path, recurse=True):
try:
os.unlink(path)
except OSError, exc:
- if recurse and exc.errno == errno.EISDIR:
+ if recurse and exc.errno in (errno.EISDIR, errno.EPERM):
shutil.rmtree(path)
elif exc.errno != errno.ENOENT:
raise
More information about the Openembedded-commits
mailing list