From 0e9a2e596ff754b36ec5c8e6bcc44c85d9b7ac35 Mon Sep 17 00:00:00 2001 From: Newbyte Date: Thu, 14 Nov 2024 22:34:52 +0100 Subject: [PATCH] pmb.config.init: Call pmb.helpers.cli.confirm() correctly (MR 2489) "y" only works here by accident as it's considered truthy by Python and as such gets handled equivalently to True in the current implementation of pmb.helpers.cli.confirm(), but it's still relying on unintended behaviour. Change this to use a bool as intended. --- pmb/config/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/config/init.py b/pmb/config/init.py index 0f824c90..4596a9ac 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -292,7 +292,7 @@ def ask_for_timezone() -> str: pass if tz: logging.info(f"Your host timezone: {tz}") - if pmb.helpers.cli.confirm("Use this timezone instead of GMT?", default="y"): + if pmb.helpers.cli.confirm("Use this timezone instead of GMT?", default=True): return tz logging.info("WARNING: Unable to determine timezone configuration on host, using GMT.") return "GMT"