Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10506 - main/branches/2.1.2/pym
Date: Fri, 30 May 2008 20:24:15
Message-Id: E1K2B8z-0002cs-G6@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-30 20:24:08 +0000 (Fri, 30 May 2008)
3 New Revision: 10506
4
5 Modified:
6 main/branches/2.1.2/pym/portage.py
7 Log:
8 Make the use_cache=0 listdir() implementation inside vardbapi.cpv_all()
9 raise a PermissionDenied error when appropriate. (trunk r10505)
10
11
12 Modified: main/branches/2.1.2/pym/portage.py
13 ===================================================================
14 --- main/branches/2.1.2/pym/portage.py 2008-05-30 20:19:43 UTC (rev 10505)
15 +++ main/branches/2.1.2/pym/portage.py 2008-05-30 20:24:08 UTC (rev 10506)
16 @@ -6802,7 +6802,10 @@
17 try:
18 return [x for x in os.listdir(p) \
19 if os.path.isdir(os.path.join(p, x))]
20 - except EnvironmentError:
21 + except EnvironmentError, e:
22 + if e.errno == portage_exception.PermissionDenied.errno:
23 + raise portage_exception.PermissionDenied(p)
24 + del e
25 return []
26
27 for x in listdir(basepath, EmptyOnError=1, ignorecvs=1, dirsonly=1):
28
29 --
30 gentoo-commits@l.g.o mailing list