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): def load_jsonfile(file):
with open(file, 'r', encoding='utf-8') as f: try:
return json.load(f) 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): def RepresentsInt(s):
try: try: