1
0
Fork 0

More explicit module unloading messages

This commit is contained in:
nemunaire 2014-08-12 17:51:37 +02:00
parent 582da6746f
commit 1464f92c87
1 changed files with 2 additions and 1 deletions

3
bot.py
View File

@ -228,7 +228,7 @@ class Bot:
def unload_module(self, name, verb=False):
"""Unload a module"""
if name in self.modules:
print (name)
self.modules[name].print_debug("Unloading module %s" % name)
self.modules[name].save()
if hasattr(self.modules[name], "unload"):
self.modules[name].unload(self)
@ -240,6 +240,7 @@ class Bot:
self.del_event(e)
# Remove from the dict
del self.modules[name]
print(" Module `%s' successfully unloaded." % name)
return True
return False