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

index 4745ea944ce258af7461e4783f3134c5960cce57..2ac6fd7f38ad46634c0eb19c6ae0601ccf3a04c3 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