From: Benjamin Peterson Date: Thu, 17 Sep 2009 02:46:54 +0000 (+0000) Subject: kill bare except X-Git-Tag: v2.7a1~521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d714cbbf1fff1711a60bd6d256bbf0e12491e09;p=thirdparty%2FPython%2Fcpython.git kill bare except --- diff --git a/Lib/getpass.py b/Lib/getpass.py index 05e9b72a75ab..9a1273cbc82b 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: