diff --git a/mindinsight/lineagemgr/querier/querier.py b/mindinsight/lineagemgr/querier/querier.py index 1ff6ef47b7c5aacb1ac10a46a6237c1f56e6b4f5..28d3b7fc9c81a51ed1a1b78f148dcff0068b7bff 100644 --- a/mindinsight/lineagemgr/querier/querier.py +++ b/mindinsight/lineagemgr/querier/querier.py @@ -318,7 +318,7 @@ class Querier: for offset_result in offset_results: for obj_name in ["metric", "user_defined"]: 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): for key, value in obj.items(): label = f'{obj_name}/{key}' diff --git a/mindinsight/lineagemgr/summary/lineage_summary_analyzer.py b/mindinsight/lineagemgr/summary/lineage_summary_analyzer.py index ff76b7908fcb6b2736cdd615e60b61e6d2e299f2..7d183b3917ab8eca06b53b5098d6586844dccf3f 100644 --- a/mindinsight/lineagemgr/summary/lineage_summary_analyzer.py +++ b/mindinsight/lineagemgr/summary/lineage_summary_analyzer.py @@ -207,6 +207,10 @@ class LineageSummaryAnalyzer(SummaryAnalyzer): log.error("Failed to get lineage information.") log.exception(err) raise LineageSummaryAnalyzeException() + except Exception as err: + log.error("Failed to get lineage information.") + log.exception(err) + raise LineageSummaryAnalyzeException() return lineage_info