summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/dbapi/vartree.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 8f8926231..5c15393fb 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -471,7 +471,10 @@ class vardbapi(dbapi):
try:
return [x for x in os.listdir(p) \
if os.path.isdir(os.path.join(p, x))]
- except EnvironmentError:
+ except EnvironmentError, e:
+ if e.errno == PermissionDenied.errno:
+ raise PermissionDenied(p)
+ del e
return []
for x in listdir(basepath, EmptyOnError=1, ignorecvs=1, dirsonly=1):