From: Senthil Kumaran Date: Thu, 24 Mar 2011 14:27:01 +0000 (+0800) Subject: issue11236 getpass.getpass to respond ctrl-c or ctrl-z X-Git-Tag: v3.3.0a1~2771 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea8b024d11093c1e4768635f118826f5a982a303;p=python issue11236 getpass.getpass to respond ctrl-c or ctrl-z --- diff --git a/Lib/getpass.py b/Lib/getpass.py index ce0456608e..dc02bd1eae 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