correction bug si fichier jsin n'existe pas
This commit is contained in:
parent
bd9a8b36bb
commit
32e7c44115
@ -67,6 +67,11 @@ class Interface:
|
||||
|
||||
|
||||
def load_jsonfile(file):
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user