Remove empty lines from multi-line config values

This commit is contained in:
shortcutme 2019-01-25 01:26:39 +01:00
parent 86657529c9
commit 5173597868
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -1053,6 +1053,10 @@ class UiWebsocket(object):
self.response(to, {"error": "Forbidden you cannot set this config key"}) self.response(to, {"error": "Forbidden you cannot set this config key"})
return return
# Remove empty lines from lists
if type(value) is list:
value = [line for line in value if line]
config.saveValue(key, value) config.saveValue(key, value)
if key not in config.keys_restart_need: if key not in config.keys_restart_need: