From 7cfe5f88ce42cd28969605bb0b8df37d0200cf39 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Tue, 26 Apr 2011 20:59:46 +0800 Subject: [PATCH] Fix for issue11236 getpass.getpass to respond ctrl-c or ctrl-z --- Lib/getpass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/getpass.py b/Lib/getpass.py index ce0456608e7..dc02bd1eaec 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