summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/getpass.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py
index be7a2f9..f0aea63 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -29,7 +29,10 @@ def getpass(prompt='Password: '):
else:
return win_getpass(prompt)
- fd = sys.stdin.fileno()
+ try:
+ fd = sys.stdin.fileno()
+ except:
+ return default_getpass(prompt)
old = termios.tcgetattr(fd) # a copy to save
new = old[:]