append ".py" when doing find_module on ModuleType.FILE
This commit is contained in:
parent
86d46c9917
commit
69a780b596
1 changed files with 2 additions and 0 deletions
|
@ -127,6 +127,8 @@ class ModuleManager(object):
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
type = ModuleType.DIRECTORY
|
type = ModuleType.DIRECTORY
|
||||||
path = os.path.join(path, "__init__.py")
|
path = os.path.join(path, "__init__.py")
|
||||||
|
else:
|
||||||
|
path = "%s.py" % path
|
||||||
|
|
||||||
return self.define_module(type, path)
|
return self.define_module(type, path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue