Browse Source

make it easier to troubleshoot config parse errors

Change the logging message displayed when the config file can't be
parsed: include the underlying exception text, so that a user who is
attepting to edit the config manually can find and fix any errors.
patch-4
x 2 years ago
committed by accumulator
parent
commit
fffbccff3b
  1. 4
      electrum/simple_config.py

4
electrum/simple_config.py

@ -717,8 +717,8 @@ def read_user_config(path):
with open(config_path, "r", encoding='utf-8') as f:
data = f.read()
result = json.loads(data)
except:
_logger.warning(f"Cannot read config file. {config_path}")
except Exception as exc:
_logger.warning(f"Cannot read config file at {config_path}: {exc}")
return {}
if not type(result) is dict:
return {}

Loading…
Cancel
Save