aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorbenadha <benawiadha@gmail.com>2021-01-31 08:47:41 +0700
committerbenadha <benawiadha@gmail.com>2021-01-31 08:47:41 +0700
commite147f1680785c6588fcdd98ee74042e2fe29604b (patch)
tree44205046f845dec92deb6315d5b253d3b1dedd0c /epy.py
parent49064f38236a4f0d32c9c59f66585d3817e2080f (diff)
downloadepy-e147f1680785c6588fcdd98ee74042e2fe29604b.tar.gz
Backward compatibility: config file
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/epy.py b/epy.py
index b0258e8..2a80420 100755
--- a/epy.py
+++ b/epy.py
@@ -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: