From e3e365de89d483b5eb2f738b773b673f6499e641 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 18 Mar 2024 18:35:17 +0100 Subject: [PATCH] ssh: stop the SSH spinner after importing a key well it's not enough because closing the overlay only gets closed if the user clicks on cancel Signed-off-by: Olivier Gayot --- subiquity/ui/views/ssh.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subiquity/ui/views/ssh.py b/subiquity/ui/views/ssh.py index 93f4785d..87c50582 100644 --- a/subiquity/ui/views/ssh.py +++ b/subiquity/ui/views/ssh.py @@ -179,8 +179,8 @@ class SSHForm(Form): class FetchingSSHKeys(WidgetWrap): def __init__(self, parent): self.parent = parent - spinner = Spinner(style="dots") - spinner.start() + self.spinner = Spinner(style="dots") + self.spinner.start() text = _("Fetching SSH keys...") button = cancel_btn(label=_("Cancel"), on_press=self.cancel) # | text | @@ -191,7 +191,7 @@ class FetchingSSHKeys(WidgetWrap): Pile( [ ("pack", Text(" " + text)), - ("pack", spinner), + ("pack", self.spinner), ("pack", button_pile([button])), ] ) @@ -199,6 +199,7 @@ class FetchingSSHKeys(WidgetWrap): ) def cancel(self, sender): + self.spinner.stop() self.parent.remove_overlay() self.parent.controller._fetch_cancel()