summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVratislav Podzimek <vpodzime@redhat.com>2013-02-14 12:54:29 +0100
committerVratislav Podzimek <vpodzime@redhat.com>2013-02-15 11:02:07 +0100
commitdc31eb0c07400dda6c73110e4f45a9250c7b0d41 (patch)
tree7c4342b2235ede74211c70c1ad07cdc2121fb743
parentdfdd137d9fe6692d9ef09151e5530b09a1ace66b (diff)
downloadanaconda-dc31eb0c07400dda6c73110e4f45a9250c7b0d41.tar.gz
anaconda-dc31eb0c07400dda6c73110e4f45a9250c7b0d41.tar.xz
anaconda-dc31eb0c07400dda6c73110e4f45a9250c7b0d41.zip
Fix reprompting and screen redrawing on invalid input
This fixes the behaviour if an invalid input was provided. 5 times it just reprompts for the input then it redraws the screen a resets the counter.
-rw-r--r--pyanaconda/ui/tui/simpleline/base.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pyanaconda/ui/tui/simpleline/base.py b/pyanaconda/ui/tui/simpleline/base.py
index e3039d28c..94d37c53f 100644
--- a/pyanaconda/ui/tui/simpleline/base.py
+++ b/pyanaconda/ui/tui/simpleline/base.py
@@ -193,11 +193,15 @@ class App(object):
# and skip the input processing once, to redisplay the screen first
self.redraw()
input_needed = False
- else:
+ elif self._redraw:
# get the widget tree from the screen and show it in the screen
input_needed = screen.refresh(args)
screen.window.show_all()
self._redraw = False
+ else:
+ # this can happen only in case there was invalid input and prompt
+ # should be shown again
+ input_needed = True
return input_needed
@@ -231,7 +235,7 @@ class App(object):
try:
# draw the screen if redraw is needed or the screen changed
# (unlikely to happen separately, but just be sure)
- if self._redraw or last_screen != self._screens[-1]:
+ if self._redraw or last_screen != self._screens[-1][0]:
# we have fresh screen, reset error counter
error_counter = 0
if not self._do_redraw():