From: Urban Wallasch Date: Thu, 1 Jul 2021 20:10:53 +0000 (+0200) Subject: * Fixed exception on first search when started without valid config file. X-Git-Tag: v0.1.0~14 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=e9a927165e4dcb6f3b1db26aefbbe1f8bab89651;p=jiten-pai.git * Fixed exception on first search when started without valid config file. --- 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 ############################################################