提交 d1860d4b 编写于 作者: T tangwei

fix syntax for PY3

上级 8d1afdeb
...@@ -180,7 +180,7 @@ def lazy_instance_by_package(package, class_name): ...@@ -180,7 +180,7 @@ def lazy_instance_by_package(package, class_name):
globals(), locals(), package.split(".")) globals(), locals(), package.split("."))
instance = getattr(model_package, class_name) instance = getattr(model_package, class_name)
return instance return instance
except Exception, err: except Exception as err:
traceback.print_exc() traceback.print_exc()
print('Catch Exception:%s' % str(err)) print('Catch Exception:%s' % str(err))
return None return None
...@@ -196,7 +196,7 @@ def lazy_instance_by_fliename(abs, class_name): ...@@ -196,7 +196,7 @@ def lazy_instance_by_fliename(abs, class_name):
globals(), locals(), package.split(".")) globals(), locals(), package.split("."))
instance = getattr(model_package, class_name) instance = getattr(model_package, class_name)
return instance return instance
except Exception, err: except Exception as err:
traceback.print_exc() traceback.print_exc()
print('Catch Exception:%s' % str(err)) print('Catch Exception:%s' % str(err))
return None return None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册