Skip to content

Commit

Permalink
fix bug in config_make_valid
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueGreenMagick committed Mar 6, 2020
1 parent a147062 commit 6178fa8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,18 @@ def config_make_valid():
}

changed = False

# Remove wrong key.
key_to_pop = []
for key in sfmt:
if key not in default_sfmt:
sfmt.pop(key)
key_to_pop.append(key)
changed = True

for key in key_to_pop:
sfmt.pop(key)

# Add keys on update / wrong deletion.
for key in default_sfmt:
if key not in sfmt:
sfmt[key] = default_sfmt[key]
Expand Down

0 comments on commit 6178fa8

Please sign in to comment.