In apply_recursive_permissions(), ignore InvalidLocation exceptions such as
authorZac Medico <zmedico@gentoo.org>
Tue, 29 Jul 2008 10:29:59 +0000 (10:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 29 Jul 2008 10:29:59 +0000 (10:29 -0000)
FileNotFound and DirectoryNotFound since sometimes things disappear, like
when adjusting permissions on DISTCC_DIR.

svn path=/main/trunk/; revision=11260

pym/portage/util.py

index d7aa7e9495b5364148fdd26c9977578299930a1f..177a6db9c0b92f5c5465c1ea7b317565b317a7d6 100644 (file)
@@ -800,8 +800,12 @@ def apply_recursive_permissions(top, uid=-1, gid=-1,
                                if not applied:
                                        all_applied = False
                        except PortageException, e:
-                               all_applied = False
-                               onerror(e)
+                               # Ignore InvalidLocation exceptions such as FileNotFound
+                               # and DirectoryNotFound since sometimes things disappear,
+                               # like when adjusting permissions on DISTCC_DIR.
+                               if not isinstance(e, portage.exception.InvalidLocation):
+                                       all_applied = False
+                                       onerror(e)
        return all_applied
 
 def apply_secpass_permissions(filename, uid=-1, gid=-1, mode=-1, mask=-1,