From 0b78e52c3a1787f32c0fe1efde22f06d2331d338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BD=D0=B5=D0=B2=D0=BD=D0=B8=D0=BA=20UNIX=27=D0=BE?= =?UTF-8?q?=D0=B8=D0=B4=D0=B0?= <84270488+thm-unix@users.noreply.github.com> Date: Thu, 15 Feb 2024 01:35:17 +0300 Subject: [PATCH] Update update-config.py --- usr/share/plainDE/tools/update-config.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/usr/share/plainDE/tools/update-config.py b/usr/share/plainDE/tools/update-config.py index 9641232..9044bb4 100644 --- a/usr/share/plainDE/tools/update-config.py +++ b/usr/share/plainDE/tools/update-config.py @@ -16,12 +16,13 @@ defaultConfig = json.load(cfgReader) for entry in defaultConfig: - if entry not in config: - config[entry] = defaultConfig[entry] - elif not isinstance(config[entry], type(defaultConfig[entry])): - commentedKey = f'#{entry}' - config[commentedKey] = config[entry] - config[entry] = defaultConfig[entry] + if not entry.startswith('panel') + if entry not in config: + config[entry] = defaultConfig[entry] + elif not isinstance(config[entry], type(defaultConfig[entry])): + commentedKey = f'#{entry}' + config[commentedKey] = config[entry] + config[entry] = defaultConfig[entry] with open(cfgPath, 'w') as cfgWriter: json.dump(config, cfgWriter, indent=4)