diff --git a/wgamesolv.py b/wgamesolv.py index 47e68db..0077335 100755 --- a/wgamesolv.py +++ b/wgamesolv.py @@ -63,10 +63,9 @@ args = parser.parse_args() # Dictionary if args.dictionary: - fp = args.dictionary try : - f = open(fp) - liste = json.load(f) + with open(args.dictionary, "r") as dico: + liste = json.load(dico) except: print("Impossible d'ouvrir le fichier" + fp)