diff options
author | benadha <benawiadha@gmail.com> | 2021-01-31 08:47:41 +0700 |
---|---|---|
committer | benadha <benawiadha@gmail.com> | 2021-01-31 08:47:41 +0700 |
commit | e147f1680785c6588fcdd98ee74042e2fe29604b (patch) | |
tree | 44205046f845dec92deb6315d5b253d3b1dedd0c /epy.py | |
parent | 49064f38236a4f0d32c9c59f66585d3817e2080f (diff) | |
download | epy-e147f1680785c6588fcdd98ee74042e2fe29604b.tar.gz |
Backward compatibility: config file
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -980,8 +980,14 @@ def loadstate(): STATEFILE = os.path.join(prefix, "state.json") try: + cfg_tmp = CFG with open(CFGFILE) as f: - CFG = json.load(f) + cfg = json.load(f) + for i in cfg_tmp: + if i != "Keys" and i in cfg: + cfg_tmp[i] = cfg[i] + cfg_tmp["Keys"].update(cfg["Keys"]) + CFG = cfg_tmp with open(STATEFILE) as f: STATE = json.load(f) except FileNotFoundError: |