From eb9820aad75059caac5c4d8f60388bd4a05ea887 Mon Sep 17 00:00:00 2001 From: yql70 Date: Fri, 28 Oct 2022 14:25:09 +0800 Subject: [PATCH 1/2] :art:update tool-flow --- client/tool/flow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/tool/flow.py b/client/tool/flow.py index e46f594a5..2acb76b1e 100644 --- a/client/tool/flow.py +++ b/client/tool/flow.py @@ -59,7 +59,8 @@ def analyze(self, params): SubProcController(["flow", "stop"], cwd=source_dir).wait() # 删除flow生成的配置文件,并将客户代码库自身的配置文件拷贝会代码库中,恢复现场 - os.remove(config_file) + if os.path.exists(config_file): + os.remove(config_file) if os.path.exists(user_config_file): copyfile(user_config_file, config_file) From b43d68bb017b6d6a1135c80123239327584baf07 Mon Sep 17 00:00:00 2001 From: yql70 Date: Fri, 28 Oct 2022 14:25:29 +0800 Subject: [PATCH 2/2] :art:update tool-infer --- client/tool/util/infer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/tool/util/infer.py b/client/tool/util/infer.py index 970175af2..841d7d007 100644 --- a/client/tool/util/infer.py +++ b/client/tool/util/infer.py @@ -13,7 +13,6 @@ import shlex import os import json -import ijson from util.subprocc import SubProcController from util.logutil import LogPrinter @@ -286,6 +285,8 @@ def _large_json_handle(self, error_output, rules, issues): ] :return: """ + import ijson + f = open(error_output, "r") parser = ijson.parse(f) is_in_issue = False