fix(nuke): didn't reload modules correctly

python 27 and 3 supported
This commit is contained in:
Jakub Jezek 2019-11-06 23:44:17 +01:00
parent fd2e0f8c27
commit 7bb247528c

View file

@ -86,12 +86,15 @@ def reload_config():
"{}.nuke.lib".format(AVALON_CONFIG),
):
log.info("Reloading module: {}...".format(module))
module = importlib.import_module(module)
try:
module = importlib.import_module(module)
reload(module)
except Exception as e:
log.warning("Cannot reload module: {}".format(e))
importlib.reload(module)
except AttributeError as e:
log.warning("Cannot reload module: {}".format(e))
reload(module)
def install():