From 8d1ff21e9ec341dff58d5db486b27b1cba172bd6 Mon Sep 17 00:00:00 2001 From: Newbyte Date: Fri, 15 Nov 2024 13:53:21 +0100 Subject: [PATCH] pmb.config.init: Use separate answer variable for sudo timer (MR 2490) Otherwise mypy gets confused about the type as in this case the variable gets set to a boolean and not a string. --- pmb/config/init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmb/config/init.py b/pmb/config/init.py index b1b13b7d..8ec5981d 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -568,11 +568,11 @@ def ask_for_additional_options(config: Config) -> None: " internally. For long running operations, it is possible" " that you'll have to authorize sudo more than once." ) - answer = pmb.helpers.cli.confirm( + answer_background_timer = pmb.helpers.cli.confirm( "Enable background timer to prevent repeated sudo authorization?", default=context.sudo_timer, ) - config.sudo_timer = answer + config.sudo_timer = answer_background_timer # Mirrors # prompt for mirror change