diff --git a/core/utils/envs.py b/core/utils/envs.py index c0004cc0dccd8c582c6229bceb8f3636428971a4..bbb2a824e6d3c5268d6ae17caed99410f714f353 100755 --- a/core/utils/envs.py +++ b/core/utils/envs.py @@ -180,7 +180,7 @@ def lazy_instance_by_package(package, class_name): globals(), locals(), package.split(".")) instance = getattr(model_package, class_name) return instance - except Exception, err: + except Exception as err: traceback.print_exc() print('Catch Exception:%s' % str(err)) return None @@ -196,7 +196,7 @@ def lazy_instance_by_fliename(abs, class_name): globals(), locals(), package.split(".")) instance = getattr(model_package, class_name) return instance - except Exception, err: + except Exception as err: traceback.print_exc() print('Catch Exception:%s' % str(err)) return None