From 29338f79bc7e7ad3edc30e3a81ae31bb5651a90b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 14 Jun 2023 15:47:17 +0200 Subject: [PATCH] apps: don't attempt to del password key if it doesn't exist --- src/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 3b749725d..03e12c84e 100644 --- a/src/app.py +++ b/src/app.py @@ -1209,7 +1209,8 @@ def app_install( for question in questions: # Or should it be more generally question.redact ? if question.type == "password": - del env_dict_for_logging[f"YNH_APP_ARG_{question.name.upper()}"] + if f"YNH_APP_ARG_{question.name.upper()}" in env_dict_for_logging: + del env_dict_for_logging[f"YNH_APP_ARG_{question.name.upper()}"] if question.name in env_dict_for_logging: del env_dict_for_logging[question.name]