Add the ability to reload submodule or a module part after a import reload (useful for reload imports of this module)
This commit is contained in:
parent
d37aeeda4c
commit
b4b24c4543
6 changed files with 29 additions and 10 deletions
|
|
@ -120,6 +120,10 @@ def load_module_from_name(name, servers, config=None):
|
|||
if md.name == name:
|
||||
mod = imp.reload(md)
|
||||
loaded = True
|
||||
try:
|
||||
mod.reload()
|
||||
except AttributeError:
|
||||
pass
|
||||
break
|
||||
if not loaded:
|
||||
mod = __import__(name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue