This commit is contained in:
DingZQ
2024-12-28 17:27:00 +08:00
parent 4e9c5ed551
commit 69978c9868
2 changed files with 8 additions and 7 deletions

View File

@@ -387,7 +387,14 @@ def convert_inp_v3_to_v2(inp: str) -> ChangeSet:
create_project(project)
open_project(project)
parse_file(project, inp, '3')
filename = f'inp/{project}_temp.inp'
if os.path.exists(filename):
os.remove(filename)
with open(filename, 'w') as f:
f.write(inp)
parse_file(project, filename, '3')
'''try:
parse_file(project, inp, version)