mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 19:52:53 +01:00
corecommands: actually assign reload() output to update the module
This commit is contained in:
parent
6904ba9606
commit
cf40a38c14
@ -72,7 +72,7 @@ def load(irc, source, args):
|
||||
return
|
||||
log.info('(%s) Loading plugin %r for %s', irc.name, name, irc.getHostmask(source))
|
||||
try:
|
||||
world.plugins[name] = pl = utils.loadPlugin(name)
|
||||
world.plugins[name] = pl = importlib.reload(utils.loadPlugin(name))
|
||||
except ImportError as e:
|
||||
if str(e) == ('No module named %r' % name):
|
||||
log.exception('Failed to load plugin %r: The plugin could not be found.', name)
|
||||
@ -80,7 +80,6 @@ def load(irc, source, args):
|
||||
log.exception('Failed to load plugin %r: ImportError.', name)
|
||||
raise
|
||||
else:
|
||||
importlib.reload(pl)
|
||||
if hasattr(pl, 'main'):
|
||||
log.debug('Calling main() function of plugin %r', pl)
|
||||
pl.main(irc)
|
||||
|
Loading…
Reference in New Issue
Block a user