From 69a780b5963d98a4d297df071ca672f69f71ed52 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 27 May 2019 16:56:13 +0100 Subject: [PATCH] append ".py" when doing find_module on ModuleType.FILE --- src/ModuleManager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ModuleManager.py b/src/ModuleManager.py index ff293446..5f1bfa61 100644 --- a/src/ModuleManager.py +++ b/src/ModuleManager.py @@ -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)