Cleanup: replace deprecated imp -> importlib

This commit is contained in:
2015-01-23 12:37:58 +11:00
parent 6a6e4a9d47
commit 3e8c0027a3
5 changed files with 15 additions and 12 deletions

View File

@@ -185,7 +185,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
traceback.print_exc()
def test_reload(mod):
import imp
import importlib
# reloading this causes internal errors
# because the classes from this module are stored internally
# possibly to refresh internal references too but for now, best not to.
@@ -193,7 +193,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
return mod
try:
return imp.reload(mod)
return importlib.reload(mod)
except:
import traceback
traceback.print_exc()