Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KlparetlR authored Jun 7, 2023
1 parent 1bcdca9 commit a92157c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions VPtool编写工具/VPtool-2.10/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@ def restart():
continue
# 后判断 method有没有
methoddata = "".join(re.findall(r"&(.+?);",tempFileTxt))
if isClass != False:
if methoddata != "" and isClass != False:
tempFileTxt = tempFileTxt.replace("&"+methoddata+";","")
if methoddata != "" and isClass == False:
print ("ERROR for <&"+methoddata+";>")
yan1 = dialogs.ask_yes_no('VPtool',f'转换时出现问题!方法名不在类匹配的范围内!\nERROR for <&{methoddata};>,是否继续转化?')
if yan1 == True:
tempFileTxt = tempFileTxt.replace("&"+methoddata+";","")
methoddata = ""
else:
restart()
# 开启包名 和 半匹配 和 有类匹配(优先)
Expand Down Expand Up @@ -290,4 +291,4 @@ def open_folder(folderpath):
open_folder(folderpath)
# 成功提示
dialogs.show_message('VPtool',f'VPtool 成功将 {fileName}.txt 文件转换为 VP或HP模组 的配置格式。\n并储存在 {folderpath} 目录中。')
root.mainloop()
root.mainloop()

0 comments on commit a92157c

Please sign in to comment.