Added a little del to the reload/unload stuff

This commit is contained in:
Jeremy Fincher 2003-08-15 05:39:35 +00:00
parent 977031163e
commit 1d9f7f331c

View File

@ -31,6 +31,7 @@
from fix import *
import gc
import os
import sys
import imp
@ -291,6 +292,8 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
if callbacks:
for callback in callbacks:
callback.die()
del callback
gc.collect()
try:
moduleInfo = imp.find_module(name)
module = imp.load_module(name, *moduleInfo)
@ -316,6 +319,8 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
if callbacks:
for callback in callbacks:
callback.die()
del callback
gc.collect()
irc.reply(msg, conf.replySuccess)
else:
irc.error(msg, 'There was no callback %s' % name)