Skip to content

Commit

Permalink
Merge pull request #678 from yql70/main
Browse files Browse the repository at this point in the history
🎨update tool-infer and tool-flow
  • Loading branch information
cyw3 authored Oct 28, 2022
2 parents 3b8ea78 + b43d68b commit c0afaf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/tool/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion client/tool/util/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import shlex
import os
import json
import ijson

from util.subprocc import SubProcController
from util.logutil import LogPrinter
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c0afaf3

Please sign in to comment.