3
0
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:
James Lu 2016-07-07 22:48:38 -07:00
parent f97f2d2fda
commit 7a7b590295

View File

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