hashed_path: convert OSError to PermissionDenied
authorZac Medico <zmedico@gentoo.org>
Mon, 17 Oct 2011 03:00:08 +0000 (20:00 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 17 Oct 2011 03:00:08 +0000 (20:00 -0700)
pym/portage/eclass_cache.py

index 4a934f16f1f80c06ed16e33065704ca76536ded1..77adcd03f6cc9b5e2e1b3fa32d09720e9edef9ff 100644 (file)
@@ -35,6 +35,8 @@ class hashed_path(object):
                        except OSError as e:
                                if e.errno in (errno.ENOENT, errno.ESTALE):
                                        raise FileNotFound(self.location)
+                               elif e.errno == PermissionDenied.errno:
+                                       raise PermissionDenied(self.location)
                                raise
                        return obj
                if not attr.islower():