From: Zac Medico Date: Sat, 27 May 2006 02:11:52 +0000 (-0000) Subject: Fix emerge's userquery() so that it rejects empty responses when the enter key is... X-Git-Tag: v2.1~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6b24af4774abf7deaef32b66e6dd3a0077a89216;p=portage.git 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 --- 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):