From 51735978681836db8b34374a033ead3da3a98b0b Mon Sep 17 00:00:00 2001 From: shortcutme Date: Fri, 25 Jan 2019 01:26:39 +0100 Subject: [PATCH] Remove empty lines from multi-line config values --- src/Ui/UiWebsocket.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Ui/UiWebsocket.py b/src/Ui/UiWebsocket.py index eb4e879a..ef5c8c02 100644 --- a/src/Ui/UiWebsocket.py +++ b/src/Ui/UiWebsocket.py @@ -1053,6 +1053,10 @@ class UiWebsocket(object): self.response(to, {"error": "Forbidden you cannot set this config key"}) return + # Remove empty lines from lists + if type(value) is list: + value = [line for line in value if line] + config.saveValue(key, value) if key not in config.keys_restart_need: