mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
corecommands: quick fix for 'reload' not updating things
The real issue is the 'unload' doesn't seem to cleanly unload things anymore. (Even though that was a pretty bad hack in the first place) That needs to be cleaned up in the next release.
This commit is contained in:
parent
f97f2d2fda
commit
7a7b590295
@ -4,6 +4,7 @@ corecommands.py - Implements core PyLink commands.
|
||||
|
||||
import gc
|
||||
import sys
|
||||
import importlib
|
||||
|
||||
from . import control
|
||||
from pylinkirc import utils, world
|
||||
@ -76,6 +77,7 @@ 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