ircbot: properly output exception msg to string
This commit is contained in:
parent
570a4e1962
commit
cdde966733
@ -621,13 +621,13 @@ class IRCBot(irc.client.SimpleIRCClient):
|
||||
log.exception(e)
|
||||
# i don't think this would get populated if __import__ failed del sys.modules[plugin_path]
|
||||
if feedback:
|
||||
self.privmsg(dest, "Plugin '{0:s}' could not be loaded: {1:s}".format(plugin_path, e))
|
||||
self.privmsg(dest, "Plugin '{0:s}' could not be loaded: {1:s}".format(plugin_path, str(e)))
|
||||
except AttributeError as e:
|
||||
log.error("Error loading '{0:s}'".format(plugin_path))
|
||||
log.exception(e)
|
||||
del sys.modules[plugin_path]
|
||||
if feedback:
|
||||
self.privmsg(dest, "Plugin '{0:s}' could not be loaded: {1:s}".format(plugin_path, e))
|
||||
self.privmsg(dest, "Plugin '{0:s}' could not be loaded: {1:s}".format(plugin_path, str(e)))
|
||||
|
||||
def handle_unload(self, connection, event, match):
|
||||
"""Handle IRC requests to unload a plugin."""
|
||||
|
Loading…
Reference in New Issue
Block a user