Skip to content

Commit

Permalink
Update update-config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thm-unix authored Feb 14, 2024
1 parent 4e19946 commit 0b78e52
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions usr/share/plainDE/tools/update-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 0b78e52

Please sign in to comment.