From: Senthil Kumaran Date: Tue, 26 Apr 2011 13:02:26 +0000 (+0800) Subject: issue11236 getpass.getpass to respond ctrl-c or ctrl-z X-Git-Tag: v2.7.2rc1~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83627ed6d501ba85461a305d20cde3b2dae2c1f1;p=python issue11236 getpass.getpass to respond ctrl-c or ctrl-z --- diff --git a/Lib/getpass.py b/Lib/getpass.py index 4745ea944c..2ac6fd7f38 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -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