From a8f1a838c16d0777a112412c7034d6e2cf69f886 Mon Sep 17 00:00:00 2001 From: Stefan Allius Date: Fri, 6 Oct 2023 23:30:04 +0200 Subject: [PATCH] never print password in logs --- app/src/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/config.py b/app/src/config.py index 19bda17..5c30294 100644 --- a/app/src/config.py +++ b/app/src/config.py @@ -60,7 +60,10 @@ class Config(): config['inverters'] = def_config['inverters'] | usr_config['inverters'] cls.config = cls.conf_schema.validate(config) - logging.debug(f'Readed config: "{cls.config}" ') + dbg_config =cls.config + dbg_mqtt= dbg_config['mqtt'] + dbg_mqtt['passwd'] = '*******' + logging.debug(f'Readed config: "{dbg_config}" ') except Exception as error: logger.error(f'Config.read: {error}')