mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Added a little del to the reload/unload stuff
This commit is contained in:
parent
977031163e
commit
1d9f7f331c
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
from fix import *
|
from fix import *
|
||||||
|
|
||||||
|
import gc
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import imp
|
import imp
|
||||||
@ -291,6 +292,8 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
|
|||||||
if callbacks:
|
if callbacks:
|
||||||
for callback in callbacks:
|
for callback in callbacks:
|
||||||
callback.die()
|
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)
|
||||||
@ -316,6 +319,8 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
|
|||||||
if callbacks:
|
if callbacks:
|
||||||
for callback in callbacks:
|
for callback in callbacks:
|
||||||
callback.die()
|
callback.die()
|
||||||
|
del callback
|
||||||
|
gc.collect()
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
else:
|
else:
|
||||||
irc.error(msg, 'There was no callback %s' % name)
|
irc.error(msg, 'There was no callback %s' % name)
|
||||||
|
Loading…
Reference in New Issue
Block a user