kill bare except
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 05e9b72..9a1273c 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -51,7 +51,7 @@
         # 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: