]> granicus.if.org Git - python/commitdiff
Fix for issue11236 getpass.getpass to respond ctrl-c or ctrl-z
authorSenthil Kumaran <orsenthil@gmail.com>
Tue, 26 Apr 2011 12:59:46 +0000 (20:59 +0800)
committerSenthil Kumaran <orsenthil@gmail.com>
Tue, 26 Apr 2011 12:59:46 +0000 (20:59 +0800)
Lib/getpass.py

index ce0456608e720197c9663d94ded2c8b48955db4c..dc02bd1eaec2e387e026065793515bd72c5244fd 100644 (file)
@@ -62,7 +62,7 @@ def unix_getpass(prompt='Password: ', stream=None):
         try:
             old = termios.tcgetattr(fd)     # a copy to save
             new = old[:]
-            new[3] &= ~(termios.ECHO|termios.ISIG)  # 3 == 'lflags'
+            new[3] &= ~termios.ECHO  # 3 == 'lflags'
             tcsetattr_flags = termios.TCSAFLUSH
             if hasattr(termios, 'TCSASOFT'):
                 tcsetattr_flags |= termios.TCSASOFT