Try calling module.unload() (if it exists) when unloading a module
This commit is contained in:
parent
72602e13f9
commit
c0fbe963a5
1 changed files with 5 additions and 0 deletions
|
@ -134,6 +134,11 @@ class ModuleManager(object):
|
|||
if not name in self.modules:
|
||||
raise ModuleNotFoundException()
|
||||
module = self.modules[name]
|
||||
if hasattr(module, "unload"):
|
||||
try:
|
||||
module.unload()
|
||||
except:
|
||||
pass
|
||||
del self.modules[name]
|
||||
|
||||
context = module._context
|
||||
|
|
Loading…
Reference in a new issue