correction bug si fichier jsin n'existe pas

This commit is contained in:
vincent 2018-01-31 22:26:34 +01:00
parent bd9a8b36bb
commit 32e7c44115

View File

@ -67,8 +67,13 @@ class Interface:
def load_jsonfile(file):
with open(file, 'r', encoding='utf-8') as f:
return json.load(f)
try:
with open(file, 'r', encoding='utf-8') as f:
return json.load(f)
except FileNotFoundError:
parsechaine(file)
with open(file, 'r', encoding='utf-8') as f:
return json.load(f)
def RepresentsInt(s):
try: