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
This commit is contained in:
Brian S. Stephan 2015-09-17 22:23:36 -05:00
parent 91594117bc
commit e8d57b29b2
1 changed files with 1 additions and 1 deletions

View File

@ -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: