raise a PermissionDenied error when appropriate. (trunk r10505)
svn path=/main/branches/2.1.2/; revision=10506
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 == portage_exception.PermissionDenied.errno:
+ raise portage_exception.PermissionDenied(p)
+ del e
return []
for x in listdir(basepath, EmptyOnError=1, ignorecvs=1, dirsonly=1):