public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10506 - main/branches/2.1.2/pym
@ 2008-05-30 20:24 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-05-30 20:24 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-05-30 20:24:08 +0000 (Fri, 30 May 2008)
New Revision: 10506

Modified:
   main/branches/2.1.2/pym/portage.py
Log:
Make the use_cache=0 listdir() implementation inside vardbapi.cpv_all()
raise a PermissionDenied error when appropriate. (trunk r10505)


Modified: main/branches/2.1.2/pym/portage.py
===================================================================
--- main/branches/2.1.2/pym/portage.py	2008-05-30 20:19:43 UTC (rev 10505)
+++ main/branches/2.1.2/pym/portage.py	2008-05-30 20:24:08 UTC (rev 10506)
@@ -6802,7 +6802,10 @@
 				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):

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-30 20:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30 20:24 [gentoo-commits] portage r10506 - main/branches/2.1.2/pym Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox