Added missing root folder check in trainer battle type migration script (#6944)

This commit is contained in:
Eduardo Quezada 2025-05-22 04:24:49 -04:00 committed by GitHub
parent 35a7caa682
commit 942a533ea1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
import re
import os
def trainer_battle_types(data):
data = re.sub(re.escape("Double Battle: No"), "Battle Type: Singles", data)
@ -6,6 +7,10 @@ def trainer_battle_types(data):
return data
if not os.path.exists("Makefile"):
print("Please run this script from your root folder.")
quit()
with open('src/data/trainers.party', 'r') as file:
data = file.read()
with open('src/data/trainers.party', 'w') as file: