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.
This commit is contained in:
Newbyte 2024-11-14 22:34:52 +01:00
parent 79c6e4c36d
commit 0e9a2e596f
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -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"