Raise ModuleNotFoundException on failure to find_module()

This commit is contained in:
jesopo 2019-06-19 23:03:43 +01:00
parent dc9cd2869f
commit 928f2f304d

View file

@ -130,6 +130,9 @@ class ModuleManager(object):
else: else:
path = "%s.py" % path path = "%s.py" % path
if not os.path.exists(path):
raise ModuleNotFoundException(name)
return self.define_module(type, path) return self.define_module(type, path)
def _module_name(self, path: str) -> str: def _module_name(self, path: str) -> str: