From b24fd679ae7aefb7d845b1ed1418fba603894f5c Mon Sep 17 00:00:00 2001 From: Vendula Poncova Date: Mon, 29 Jul 2019 18:28:18 +0200 Subject: [PATCH] Always close the password dialog The password dialog should be closed even if no password is provided. Otherwise, it is not possible to continue, because the UI is blocked. --- simpleline/render/adv_widgets.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/simpleline/render/adv_widgets.py b/simpleline/render/adv_widgets.py index 781d2c5..58376ab 100644 --- a/simpleline/render/adv_widgets.py +++ b/simpleline/render/adv_widgets.py @@ -87,14 +87,13 @@ def prompt(self, args=None): return None self._password = handler.value - if not self._password: - return None - else: - # this may seem innocuous, but it's really a giant hack; we should - # not be calling close() from prompt(), but the input handling code - # in the TUI is such that without this very simple workaround, we - # would be forever pelting users with a prompt to enter their pw - self.close() + + # this may seem innocuous, but it's really a giant hack; we should + # not be calling close() from prompt(), but the input handling code + # in the TUI is such that without this very simple workaround, we + # would be forever pelting users with a prompt to enter their pw + self.close() + return None @property def answer(self):