From cdde96673347c4ee1fdc23d3b21900d7bc8b99e3 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 16 Jan 2016 19:34:06 -0600 Subject: [PATCH] ircbot: properly output exception msg to string --- dr_botzo/ircbot/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dr_botzo/ircbot/bot.py b/dr_botzo/ircbot/bot.py index ab2448d..de7ab71 100644 --- a/dr_botzo/ircbot/bot.py +++ b/dr_botzo/ircbot/bot.py @@ -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."""