summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2016-11-16 14:46:05 +0100
committerSylvain Thénault <sylvain.thenault@logilab.fr>2016-11-16 14:46:05 +0100
commitec2624494f474da0eb42ac27a8d2eadc5fd9a846 (patch)
tree2ac8e98b610b1a6dffdfe166f5bffd6696bc2cf5
parent0533324e9a9f1dd7ec31c5beb7cd373eff434e38 (diff)
downloadlogilab-common-ec2624494f474da0eb42ac27a8d2eadc5fd9a846.tar.gz
Fix test breakage in modutils with python 3
-rw-r--r--logilab/common/modutils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/logilab/common/modutils.py b/logilab/common/modutils.py
index 6d13201..f8e91ad 100644
--- a/logilab/common/modutils.py
+++ b/logilab/common/modutils.py
@@ -654,7 +654,9 @@ def _module_file(modpath, path=None):
# setuptools has added into sys.modules a module object with proper
# __path__, get back information from there
module = sys.modules[modpath.pop(0)]
- path = module.__path__
+ # use list() to protect against _NamespacePath instance we get with python 3, which
+ # find_module later doesn't like
+ path = list(module.__path__)
if not modpath:
return C_BUILTIN, None
imported = []