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:
parent
91594117bc
commit
e8d57b29b2
@ -619,7 +619,7 @@ class IRCBot(irc.client.SimpleIRCClient):
|
|||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
log.error("Error loading '{0:s}'".format(plugin_path))
|
log.error("Error loading '{0:s}'".format(plugin_path))
|
||||||
log.exception(e)
|
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:
|
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, e))
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user