Fix emerge's userquery() so that it rejects empty responses when the enter key is...
authorZac Medico <zmedico@gentoo.org>
Sat, 27 May 2006 02:11:52 +0000 (02:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 May 2006 02:11:52 +0000 (02:11 -0000)
svn path=/main/trunk/; revision=3426

bin/emerge

index c87151eb26945453933723b031b938c9a9d6dc18..bd16ad5231bf40f517bb738d193c75bc1fb210e2 100755 (executable)
@@ -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):