From 67edca067c4de2d6b8cd4dfd9c9bb70f1bdc3bb0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 24 Sep 2018 16:15:44 +0100 Subject: [PATCH] Be more verbose about reloading modules in modules.py --- modules/modules.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/modules.py b/modules/modules.py index 91bc02a7..23c3d69f 100644 --- a/modules/modules.py +++ b/modules/modules.py @@ -52,6 +52,14 @@ class Module(object): except ModuleManager.ModuleNotFoundException: event["stderr"].write("Module '%s' isn't loaded" % name) return + except ModuleManager.ModuleWarning as warning: + event["stderr"].write("Module '%s' not loaded: %s" % ( + name, str(e))) + return + except Exception as e: + event["stderr"].write("Failed to reload module '%s': %s" % ( + name, str(e))) + return event["stdout"].write("Reloaded '%s'" % name) def reload_all(self, event):