summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-12 15:27:40 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-12 15:27:40 +0000
commit16a1cc858b8552a524f29b61e32a47161bcc2d6c (patch)
treef49605e5d895e330bb8d9e902bf8274bb324c01b
parentec4bcdafd6edb360be7ee309dbeff60977113be5 (diff)
downloadportage-16a1cc858b8552a524f29b61e32a47161bcc2d6c.tar.gz
portage-16a1cc858b8552a524f29b61e32a47161bcc2d6c.tar.bz2
portage-16a1cc858b8552a524f29b61e32a47161bcc2d6c.zip
Catch errno.ENOTDIR instead of using os.path.isdir().
svn path=/main/trunk/; revision=7770
-rw-r--r--pym/portage/eclass_cache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/eclass_cache.py b/pym/portage/eclass_cache.py
index 6e4eebd18..8fac8aec4 100644
--- a/pym/portage/eclass_cache.py
+++ b/pym/portage/eclass_cache.py
@@ -43,8 +43,6 @@ class cache(object):
self._eclass_locations = {}
eclass_len = len(".eclass")
for x in [normalize_path(os.path.join(y,"eclass")) for y in self.porttrees]:
- if not os.path.isdir(x):
- continue
eclass_filenames = []
try:
for y in os.listdir(x):
@@ -54,6 +52,9 @@ class cache(object):
if e.errno == errno.ENOENT:
del e
continue
+ elif e.errno == errno.ENOTDIR:
+ del e
+ continue
elif e.errno == PermissionDenied.errno:
raise PermissionDenied(x)
raise