summaryrefslogtreecommitdiff
path: root/Lib/getpass.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/getpass.py')
-rw-r--r--Lib/getpass.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 3ca7fb238d..2ac6fd7f38 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -51,7 +51,7 @@ def unix_getpass(prompt='Password: ', stream=None):
# If that fails, see if stdin can be controlled.
try:
fd = sys.stdin.fileno()
- except:
+ except (AttributeError, ValueError):
passwd = fallback_getpass(prompt, stream)
input = sys.stdin
if not stream:
@@ -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