Poprawiono zapis ruchow do pliku
This commit is contained in:
parent
6289ce99b1
commit
f9a7a69d16
10
utilities.py
10
utilities.py
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user