mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Reordered some statements.
This commit is contained in:
parent
184e9be97d
commit
be45eb2e25
@ -212,9 +212,9 @@ class OwnerCommands(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
module = imp.load_module(name, *moduleInfo)
|
module = imp.load_module(name, *moduleInfo)
|
||||||
linecache.checkcache()
|
linecache.checkcache()
|
||||||
callback = module.Class()
|
callback = module.Class()
|
||||||
|
irc.addCallback(callback)
|
||||||
if hasattr(callback, 'configure'):
|
if hasattr(callback, 'configure'):
|
||||||
callback.configure(irc)
|
callback.configure(irc)
|
||||||
irc.addCallback(callback)
|
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@ -239,18 +239,18 @@ class OwnerCommands(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
callbacks = irc.removeCallback(name)
|
callbacks = irc.removeCallback(name)
|
||||||
|
|
||||||
if callbacks:
|
if callbacks:
|
||||||
for callback in callbacks:
|
|
||||||
callback.die()
|
|
||||||
del callback
|
|
||||||
gc.collect()
|
|
||||||
try:
|
try:
|
||||||
moduleInfo = imp.find_module(name)
|
moduleInfo = imp.find_module(name)
|
||||||
module = imp.load_module(name, *moduleInfo)
|
module = imp.load_module(name, *moduleInfo)
|
||||||
linecache.checkcache()
|
linecache.checkcache()
|
||||||
|
for callback in callbacks:
|
||||||
|
callback.die()
|
||||||
|
del callback
|
||||||
|
gc.collect()
|
||||||
callback = module.Class()
|
callback = module.Class()
|
||||||
|
irc.addCallback(callback)
|
||||||
if hasattr(callback, 'configure'):
|
if hasattr(callback, 'configure'):
|
||||||
callback.configure(irc)
|
callback.configure(irc)
|
||||||
irc.addCallback(callback)
|
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
for callback in callbacks:
|
for callback in callbacks:
|
||||||
|
Loading…
Reference in New Issue
Block a user