summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/__init__.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index f58af8411..25c676f8e 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -5309,8 +5309,14 @@ class vardbapi(dbapi):
def _aux_get(self, mycpv, wants):
mydir = os.path.join(self.root, VDB_PATH, mycpv)
- if not os.path.isdir(mydir):
- raise KeyError(mycpv)
+ try:
+ if not stat.S_ISDIR(os.stat(mydir).st_mode):
+ raise KeyError(mycpv)
+ except OSError, e:
+ if e.errno == errno.ENOENT:
+ raise KeyError(mycpv)
+ del e
+ raise
results = []
for x in wants:
try: