Commits

jayd3e committed 1ebe8b9

Actually fixed the 'except' syntax this time.

Comments (0)

Files changed (2)

 """
 
 import six
+import sys
 import webob
 import webob.exc
 from types import ClassType
                 if self.middleware_wraps:
                     args = (self.middleware_wraps,) + args
                 resp = self.call_func(req, *args, **self.kwargs)
-            except webob.exc.HTTPException as resp:
-                pass
+            except webob.exc.HTTPException:
+                resp = sys.exc_info()[1]
             if resp is None:
                 ## FIXME: I'm not sure what this should be?
                 resp = req.response
     def __call__(self, environ, start_response):
         try:
             return self.application(environ, start_response)
-        except HTTPException as exc:
+        except HTTPException:
+            exc = sys.exc_info()[1]
             parent_exc_info = sys.exc_info()
             def repl_start_response(status, headers, exc_info=None):
                 if exc_info is None: