mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix(nuke): didn't reload modules correctly
python 27 and 3 supported
This commit is contained in:
parent
fd2e0f8c27
commit
7bb247528c
1 changed files with 7 additions and 4 deletions
|
|
@ -86,12 +86,15 @@ def reload_config():
|
||||||
"{}.nuke.lib".format(AVALON_CONFIG),
|
"{}.nuke.lib".format(AVALON_CONFIG),
|
||||||
):
|
):
|
||||||
log.info("Reloading module: {}...".format(module))
|
log.info("Reloading module: {}...".format(module))
|
||||||
|
|
||||||
|
module = importlib.import_module(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
module = importlib.import_module(module)
|
|
||||||
reload(module)
|
|
||||||
except Exception as e:
|
|
||||||
log.warning("Cannot reload module: {}".format(e))
|
|
||||||
importlib.reload(module)
|
importlib.reload(module)
|
||||||
|
except AttributeError as e:
|
||||||
|
log.warning("Cannot reload module: {}".format(e))
|
||||||
|
reload(module)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def install():
|
def install():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue