提交 65b01466 编写于 作者: L luopengting

fix pylint, catch Exception for parsing summary

上级 42cb780f
...@@ -318,7 +318,7 @@ class Querier: ...@@ -318,7 +318,7 @@ class Querier:
for offset_result in offset_results: for offset_result in offset_results:
for obj_name in ["metric", "user_defined"]: for obj_name in ["metric", "user_defined"]:
obj = getattr(offset_result, obj_name) obj = getattr(offset_result, obj_name)
require = True if obj_name == "metric" else False require = bool(obj_name == "metric")
if obj and isinstance(obj, dict): if obj and isinstance(obj, dict):
for key, value in obj.items(): for key, value in obj.items():
label = f'{obj_name}/{key}' label = f'{obj_name}/{key}'
......
...@@ -207,6 +207,10 @@ class LineageSummaryAnalyzer(SummaryAnalyzer): ...@@ -207,6 +207,10 @@ class LineageSummaryAnalyzer(SummaryAnalyzer):
log.error("Failed to get lineage information.") log.error("Failed to get lineage information.")
log.exception(err) log.exception(err)
raise LineageSummaryAnalyzeException() raise LineageSummaryAnalyzeException()
except Exception as err:
log.error("Failed to get lineage information.")
log.exception(err)
raise LineageSummaryAnalyzeException()
return lineage_info return lineage_info
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册