Fix version code detection in patchport

This commit is contained in:
ave 2020-05-17 16:40:54 +03:00
parent 3f66c64829
commit 4222669a72
Signed by: a
GPG key ID: 398DD7BD03276F6D

View file

@ -199,9 +199,9 @@ for patch in os.listdir(os.path.join(cutthecord_folder, "patches")):
# Add supported version to readme of that patch, hacky
# https://stackoverflow.com/a/35130508/3286892
with open(readme_path, 'r') as f:
readme_text = f.read().replace(f'- {from_versionname}',
readme_text = f.read().replace(f'- {from_versionname}\n',
f'- {from_versionname}\n'
f'- {to_versionname}')
f'- {to_versionname}\n')
with open(readme_path, "w") as f:
f.write(readme_text)