Loading py/utopya_tools.py +2 −8 Original line number Diff line number Diff line Loading @@ -83,9 +83,7 @@ def ImportClass(moduleclass): import os import sys import time import imp # import importlib import importlib # check .. if "." not in moduleclass: Loading @@ -104,11 +102,7 @@ def ImportClass(moduleclass): # import this module with the specified class: try: # ~ this sometimes fails if module file was just copied to a newly created directory ... # mod = __import__( modulename, fromlist=[classname] ) # ~ this seems to work for the moment ... fp, pathname, description = imp.find_module(modulename, sys.path) mod = imp.load_module(modulename, fp, pathname, description) mod = importlib.import_module( modulename ) except ImportError: logging.error('Could not import module "%s" ...' % (modulename)) logging.error("Search path:") Loading Loading
py/utopya_tools.py +2 −8 Original line number Diff line number Diff line Loading @@ -83,9 +83,7 @@ def ImportClass(moduleclass): import os import sys import time import imp # import importlib import importlib # check .. if "." not in moduleclass: Loading @@ -104,11 +102,7 @@ def ImportClass(moduleclass): # import this module with the specified class: try: # ~ this sometimes fails if module file was just copied to a newly created directory ... # mod = __import__( modulename, fromlist=[classname] ) # ~ this seems to work for the moment ... fp, pathname, description = imp.find_module(modulename, sys.path) mod = imp.load_module(modulename, fp, pathname, description) mod = importlib.import_module( modulename ) except ImportError: logging.error('Could not import module "%s" ...' % (modulename)) logging.error("Search path:") Loading