From e8d57b29b216ac5e6385401b72288c0da4c72da2 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 17 Sep 2015 22:23:36 -0500 Subject: [PATCH] irclib.bot: don't del sys.modules[badname] this makes no sense to do on ImportError since that's probably why we got here. testing, not 100% sure this is right --- dr_botzo/ircbot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr_botzo/ircbot/bot.py b/dr_botzo/ircbot/bot.py index a22ef09..30f90e8 100644 --- a/dr_botzo/ircbot/bot.py +++ b/dr_botzo/ircbot/bot.py @@ -619,7 +619,7 @@ class IRCBot(irc.client.SimpleIRCClient): except ImportError as e: log.error("Error loading '{0:s}'".format(plugin_path)) log.exception(e) - del sys.modules[plugin_path] + # 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)) except AttributeError as e: