From 928f2f304d3d9cc4406147f366796fbab03b0569 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 19 Jun 2019 23:03:43 +0100 Subject: [PATCH] Raise ModuleNotFoundException on failure to find_module() --- src/ModuleManager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ModuleManager.py b/src/ModuleManager.py index 48283c1d..6d1308db 100644 --- a/src/ModuleManager.py +++ b/src/ModuleManager.py @@ -130,6 +130,9 @@ class ModuleManager(object): else: path = "%s.py" % path + if not os.path.exists(path): + raise ModuleNotFoundException(name) + return self.define_module(type, path) def _module_name(self, path: str) -> str: