[yum-cvs] output.py

Seth Vidal skvidal at linux.duke.edu
Fri Dec 7 03:45:18 UTC 2007


 output.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b8284b868d16b478a80222f79b226d60a4fe7433
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Thu Dec 6 22:44:53 2007 -0500

    make sure we're strict about what we accept for the y/n prompt
    patch from Josh Bressers in rh bug 351591

diff --git a/output.py b/output.py
index af77759..c4d780c 100644
--- a/output.py
+++ b/output.py
@@ -319,10 +319,10 @@ class YumOutput:
             except:
                 choice = ''
             choice = choice.lower()
-            if len(choice) == 0 or choice[0] in ['y', 'n']:
+            if len(choice) == 0 or choice in ['y', 'n', 'yes', 'no']:
                 break
 
-        if len(choice) == 0 or choice[0] != 'y':
+        if len(choice) == 0 or choice not in ['y', 'yes']:
             return False
         else:            
             return True



More information about the Yum-cvs-commits mailing list