[rhel7/master/f21] Catch EOFError in raw_input (#1158841)
Vratislav Podzimek
vpodzime at redhat.com
Fri Oct 31 06:56:10 UTC 2014
On Thu, 2014-10-30 at 17:24 -0700, Brian C. Lane wrote:
> Just in case someone hits ctrl-d in text mode.
>
> Resolves: rhbz#1158841
> ---
> pyanaconda/ui/tui/simpleline/base.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/ui/tui/simpleline/base.py b/pyanaconda/ui/tui/simpleline/base.py
> index 8a17e72..7ad8276 100644
> --- a/pyanaconda/ui/tui/simpleline/base.py
> +++ b/pyanaconda/ui/tui/simpleline/base.py
> @@ -158,8 +158,12 @@ class App(object):
> return
> else:
> # lock acquired, we can run raw_input
> - data = raw_input()
> - RAW_INPUT_LOCK.release()
> + try:
> + data = raw_input()
> + except EOFError:
> + data = ""
> + finally:
> + RAW_INPUT_LOCK.release()
>
> queue.put((hubQ.HUB_CODE_INPUT, [data]))
I'd swear we've already fixed this before. ACK.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list