From d6b64ecb5bfb6d49ca8e97f58e3ad65075810269 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sun, 15 Apr 2007 18:14:24 +0200 Subject: don't except: when knowing whats thrown --- wsgitools/middlewares.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsgitools/middlewares.py b/wsgitools/middlewares.py index a0b4a7c..17afd76 100644 --- a/wsgitools/middlewares.py +++ b/wsgitools/middlewares.py @@ -244,7 +244,7 @@ class BasicAuthMiddleware: auth_type, enc_auth_info = auth.split(None, 1) try: auth_info = enc_auth_info.decode("base64") - except: # It throws some non-standard exception. + except Exception: # It throws something from binascii. return self.authorization_required(environ, start_response) if auth_type.lower() != "basic" or ':' not in auth_info: return self.authorization_required(environ, start_response) -- cgit v1.2.3