From: Zac Medico Date: Fri, 30 May 2008 20:19:43 +0000 (-0000) Subject: Make the use_cache=0 listdir() implementation inside vardbapi.cpv_all() X-Git-Tag: v2.2_pre8~61 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d4942e36d8de1812ed7938ab5acd0baff6e9b56;p=portage.git Make the use_cache=0 listdir() implementation inside vardbapi.cpv_all() rains a PermissionDenied error when appropriate. svn path=/main/trunk/; revision=10505 --- 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):