projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6575452
)
Fix cacheddir() to behave properly if os.listdir() raises errno.EACCES (Permission...
author
Zac Medico
<zmedico@gentoo.org>
Tue, 19 Jun 2007 21:59:55 +0000
(21:59 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Tue, 19 Jun 2007 21:59:55 +0000
(21:59 -0000)
svn path=/main/trunk/; revision=6879
pym/portage/__init__.py
patch
|
blob
|
history
diff --git
a/pym/portage/__init__.py
b/pym/portage/__init__.py
index ed440bcbebaa7f50b866c875071e4f11c8fe07e6..31f2f091c7c678d3f889948e91b6d9eee234b967 100644
(file)
--- a/
pym/portage/__init__.py
+++ b/
pym/portage/__init__.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: