]> granicus.if.org Git - python/commitdiff
kill bare except
authorBenjamin Peterson <benjamin@python.org>
Thu, 17 Sep 2009 02:46:54 +0000 (02:46 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 17 Sep 2009 02:46:54 +0000 (02:46 +0000)
Lib/getpass.py

index 05e9b72a75ab85163eb50917c5f64bd2416b15f0..9a1273cbc82b50a192c874e4654949a6ad4b30f7 100644 (file)
@@ -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: