Kaydet (Commit) 7cfe5f88 authored tarafından Senthil Kumaran's avatar Senthil Kumaran

Fix for issue11236 getpass.getpass to respond ctrl-c or ctrl-z

üst ba42fd58
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment