summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsylvain thenault <sylvain.thenault@logilab.fr>2009-03-25 09:46:04 +0100
committersylvain thenault <sylvain.thenault@logilab.fr>2009-03-25 09:46:04 +0100
commit80acd8c6275f68e0c202f936d78b27ea7f3e9b73 (patch)
tree5302271ae8856f1ae8e781bc84e81b42e7d9b538
parenta61b090128e774c6b720e0114632ee538a0c4633 (diff)
downloadlogilab-common-80acd8c6275f68e0c202f936d78b27ea7f3e9b73.tar.gz
ValueError may occurs
-rw-r--r--modutils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modutils.py b/modutils.py
index 6c67964..5253916 100644
--- a/modutils.py
+++ b/modutils.py
@@ -585,12 +585,15 @@ def _module_file(modpath, path=None):
else:
if checkeggs:
fullabspath = [abspath(x) for x in _path]
- pathindex = fullabspath.index(dirname(abspath(mp_filename)))
try:
+ pathindex = fullabspath.index(dirname(abspath(mp_filename)))
emtype, emp_filename, zippath = _search_zip(modpath, pic)
if pathindex > _path.index(zippath):
# an egg takes priority
return emtype, emp_filename
+ except ValueError:
+ # XXX not in _path
+ pass
except ImportError:
pass
checkeggs = False