append ".py" when doing find_module on ModuleType.FILE

This commit is contained in:
jesopo 2019-05-27 16:56:13 +01:00
parent 86d46c9917
commit 69a780b596

View file

@ -127,6 +127,8 @@ class ModuleManager(object):
if os.path.isdir(path):
type = ModuleType.DIRECTORY
path = os.path.join(path, "__init__.py")
else:
path = "%s.py" % path
return self.define_module(type, path)