projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd85a8f
)
Fix cacheddir() to behave properly if os.listdir() raises errno.EACCES (Permission...
author
Zac Medico
<zmedico@gentoo.org>
Mon, 30 Jul 2007 04:26:52 +0000
(
04:26
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 30 Jul 2007 04:26:52 +0000
(
04:26
-0000)
svn path=/main/branches/2.1.2.9/; revision=7468
pym/portage.py
patch
|
blob
|
history
diff --git
a/pym/portage.py
b/pym/portage.py
index 0b6e3195e6f8b76117762a2115a85585506eb796..2a153a29833e85b7f2d87fcf1f3e168eaa7281bb 100644
(file)
--- a/
pym/portage.py
+++ b/
pym/portage.py
@@
-193,7
+193,15
@@
def cacheddir(my_original_path, ignorecvs, ignorelist, EmptyOnError, followSymli
if mtime != cached_mtime or time.time() - mtime < 4:
if dircache.has_key(mypath):
cacheStale += 1
- list = os.listdir(mypath)
+ try:
+ list = os.listdir(mypath)
+ except EnvironmentError, e:
+ if e.errno != errno.EACCES:
+ raise
+ del e
+ if EmptyOnError:
+ return [], []
+ raise portage_exception.PermissionDenied(mypath)
ftype = []
for x in list:
try: