confighelper: update 'Invalid config option' warning for better understanding

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2021-08-29 20:02:17 +02:00 committed by Eric Callahan
parent 245053434f
commit 81176a6d31
1 changed files with 5 additions and 3 deletions

View File

@ -153,9 +153,11 @@ class ConfigHelper:
for opt, val in self.config.items(sect):
if opt not in parsed_opts:
self.server.add_warning(
f"Invalid config option '{opt}' detected in section "
f"[{sect}]. Remove the option to resolve this issue. "
"In the future this will result in a startup error.")
f"Invalid config option '{opt}: {val}' detected in "
f"section [{sect}]. To solve this issue check your "
"moonraker config. This option is invalid and has to "
"be deleted or fixed. In the future this will result "
"in a startup error.")
def get_configuration(server: Server,
app_args: Dict[str, Any]