summaryrefslogtreecommitdiff
path: root/modutils.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-10-01 08:50:58 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-10-01 08:50:58 +0200
commit7c7ee3fac839afba6e1af60b82280026bed21062 (patch)
tree6e97fcf4431119c9663e033718d35b4b66bb4d23 /modutils.py
parent6d79f7db918a5c9efb8e2cb579ade58b411f8d68 (diff)
downloadlogilab-common-7c7ee3fac839afba6e1af60b82280026bed21062.tar.gz
maniac cleanup
Diffstat (limited to 'modutils.py')
-rw-r--r--modutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modutils.py b/modutils.py
index 543955f..379d24c 100644
--- a/modutils.py
+++ b/modutils.py
@@ -138,7 +138,7 @@ def load_module_from_modpath(parts, path=None, use_sys=1):
prevmodule = None
for part in parts:
modpath.append(part)
- curname = ".".join(modpath)
+ curname = '.'.join(modpath)
module = None
if len(modpath) != len(parts):
# even with use_sys=False, should try to get outer packages from sys.modules
@@ -148,9 +148,9 @@ def load_module_from_modpath(parts, path=None, use_sys=1):
module = load_module(curname, mp_file, mp_filename, mp_desc)
if prevmodule:
setattr(prevmodule, part, module)
- _file = getattr(module, "__file__", "")
+ _file = getattr(module, '__file__', '')
if not _file and len(modpath) != len(parts):
- raise ImportError("no module in %s" % ".".join(parts[len(modpath):]) )
+ raise ImportError('no module in %s' % '.'.join(parts[len(modpath):]) )
path = [dirname( _file )]
prevmodule = module
return module