From 6b24af4774abf7deaef32b66e6dd3a0077a89216 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 27 May 2006 02:11:52 +0000 Subject: [PATCH] Fix emerge's userquery() so that it rejects empty responses when the enter key is pressed for bug #134466. svn path=/main/trunk/; revision=3426 --- bin/emerge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/emerge b/bin/emerge index c87151eb2..bd16ad523 100755 --- a/bin/emerge +++ b/bin/emerge @@ -133,7 +133,7 @@ def userquery(prompt, responses=None, colours=None): while True: response=raw_input("["+string.join([colours[i](responses[i]) for i in range(len(responses))],"/")+"] ") for key in responses: - if response.upper()==key[:len(response)].upper(): + if response and response.upper()==key[:len(response)].upper(): return key print "Sorry, response '%s' not understood." % response, except (EOFError, KeyboardInterrupt): -- 2.26.2