Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea8b024

Browse files
committed
issue11236 getpass.getpass to respond ctrl-c or ctrl-z
1 parent e6ead39 commit ea8b024

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/getpass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def unix_getpass(prompt='Password: ', stream=None):
6262
try:
6363
old = termios.tcgetattr(fd) # a copy to save
6464
new = old[:]
65-
new[3] &= ~(termios.ECHO|termios.ISIG) # 3 == 'lflags'
65+
new[3] &= ~termios.ECHO # 3 == 'lflags'
6666
tcsetattr_flags = termios.TCSAFLUSH
6767
if hasattr(termios, 'TCSASOFT'):
6868
tcsetattr_flags |= termios.TCSASOFT

0 commit comments

Comments
 (0)