diff options
| author | Sergey Schetinin <sergey@maluke.com> | 2011-09-24 12:10:44 +0300 |
|---|---|---|
| committer | Sergey Schetinin <sergey@maluke.com> | 2011-09-24 12:10:44 +0300 |
| commit | c4bb1a6a6aa6942229845e5390a565abac76f01c (patch) | |
| tree | 4571d1cda0fc25e5c70aa4c9485eed3cb47320de | |
| parent | 6fdb47d698e0554e2c2355e52994f512d9de39c1 (diff) | |
| download | webob-sergey-1.2-py2-only.tar.gz | |
use except Exception as exc syntaxsergey-1.2-py2-only
| -rw-r--r-- | webob/dec.py | 4 | ||||
| -rw-r--r-- | webob/exc.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/webob/dec.py b/webob/dec.py index b89e435..cff95fe 100644 --- a/webob/dec.py +++ b/webob/dec.py @@ -145,8 +145,8 @@ class wsgify(object): if self.middleware_wraps: args = (self.middleware_wraps,) + args resp = self.call_func(req, *args, **self.kwargs) - except webob.exc.HTTPException: - resp = sys.exc_info()[1] + except webob.exc.HTTPException as resp: + pass if resp is None: ## FIXME: I'm not sure what this should be? resp = req.response diff --git a/webob/exc.py b/webob/exc.py index ebcab0f..fac6273 100644 --- a/webob/exc.py +++ b/webob/exc.py @@ -1023,7 +1023,7 @@ class HTTPExceptionMiddleware(object): def __call__(self, environ, start_response): try: return self.application(environ, start_response) - except HTTPException, exc: + except HTTPException as exc: parent_exc_info = sys.exc_info() def repl_start_response(status, headers, exc_info=None): if exc_info is None: |
