Poprawiono zapis ruchow do pliku

This commit is contained in:
Konrad Pierzyński 2019-05-22 10:55:13 +02:00
parent 6289ce99b1
commit f9a7a69d16

View File

@ -29,10 +29,16 @@ def save_moveset(moveset):
path = '\moveset_data.json' path = '\moveset_data.json'
else: else:
path = '/moveset_data.json' path = '/moveset_data.json'
output_file = os.path.normpath(os.getcwd()) + '\moveset_data.json' output_file = os.path.normpath(os.getcwd()) + path
results = {} results = {}
f = open(output_file, 'r+') try:
f = open(output_file, 'r+')
except:
open(output_file, 'a').close()
finally:
f = open(output_file, 'r+')
try: try:
results = json.load(f) results = json.load(f)
except: except: