From d1860d4bc46365a80e08d39af3614ca00ee49064 Mon Sep 17 00:00:00 2001 From: tangwei Date: Wed, 10 Jun 2020 10:57:41 +0800 Subject: [PATCH] fix syntax for PY3 --- core/utils/envs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/utils/envs.py b/core/utils/envs.py index c0004cc0..bbb2a824 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 -- GitLab