Silly error, don't delete a key if it doesn't exist

This commit is contained in:
cmdr2 2023-07-22 15:10:33 +05:30
parent ade0912ba1
commit 721ab8a0c7

View File

@ -183,7 +183,8 @@ def setConfig(config):
config = commented_config
yaml.indent(mapping=2, sequence=4, offset=2)
del config["config_on_startup"]
if "config_on_startup" in config:
del config["config_on_startup"]
try:
f = open(config_yaml_path + ".tmp", "w", encoding="utf-8")