解决查看cfg.json 详情程序崩溃的bug

This commit is contained in:
ranchuan
2023-12-15 19:19:19 +08:00
parent 77d3b964ef
commit bd0ae7462f
2 changed files with 4 additions and 2 deletions

View File

@@ -79,7 +79,8 @@ def _detail_json(name:str):
return s
with open(name,"rb") as f:
j=json.loads(f.read())
if(file_name!="cfg.json"):
print("file_name:",file_name)
if(file_name[-1]!="cfg.json"):
ret=[" |文件类型:检测方案文件"]
ret.append(" |方案描述:{d}".format(d=j["PlanBrief"]))
ret.append(" |方案ID:{id}".format(id=j["PlanID"]))