From e9a927165e4dcb6f3b1db26aefbbe1f8bab89651 Mon Sep 17 00:00:00 2001 From: Urban Wallasch Date: Thu, 1 Jul 2021 22:10:53 +0200 Subject: [PATCH] * Fixed exception on first search when started without valid config file. --- jiten-pai.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jiten-pai.py b/jiten-pai.py index 6202775..9846832 100755 --- a/jiten-pai.py +++ b/jiten-pai.py @@ -144,12 +144,11 @@ def _load_cfg(): try: with open(cfname, 'r') as cfgfile: cfg.update(json.load(cfgfile)) - global _dict_lookup - _dict_lookup = _dict_lookup_load if cfg['dict_load'] else _dict_lookup_noload cfg['cfgfile'] = cfname - return except Exception as e: eprint('_load_cfg:', cfname, str(e)) + global _dict_lookup + _dict_lookup = _dict_lookup_load if cfg['dict_load'] else _dict_lookup_noload ############################################################ -- 2.30.2