diff --git a/DrBotIRC.py b/DrBotIRC.py index 292a6e1..150f773 100644 --- a/DrBotIRC.py +++ b/DrBotIRC.py @@ -453,8 +453,10 @@ class DrBotIRC(irclib.IRC): self.config.set('dr.botzo', 'module_list', ','.join(modset)) return 'Module ' + modname + ' loaded.' - except ImportError: - return 'Module ' + modname + ' not found.' + except ImportError as e: + self.log.error("Error loading " + modname) + self.log.exception(e) + return "Module '" + modname + "' could not be loaded." def unload_module(self, modname): """Attempt to unload and del a module if it's loaded."""