git commit -a -mm
authorFabien Meghazi <fme@openerp.com>
Wed, 18 Jun 2014 14:56:46 +0000 (16:56 +0200)
committerFabien Meghazi <fme@openerp.com>
Wed, 18 Jun 2014 14:56:46 +0000 (16:56 +0200)
openerp/addons/base/ir/ir_http.py
openerp/http.py

index 867abf1..122b9d9 100644 (file)
@@ -104,7 +104,7 @@ class ir_http(osv.AbstractModel):
         # check authentication level
         try:
             auth_method = self._authenticate(func.routing["auth"])
-        except Exception, e:
+        except Exception:
             # force a Forbidden exception with the original traceback
             return self._handle_exception(
                 convert_exception_to(
index 3bc2bc3..d32d003 100644 (file)
@@ -460,10 +460,8 @@ class HttpRequest(WebRequest):
            be used as response."""
         try:
             return super(HttpRequest, self)._handle_exception(exception)
-        except Exception, e:
-            if isinstance(e, werkzeug.exceptions.HTTPException):
-                return e
-            raise
+        except werkzeug.exceptions.HTTPException, e:
+            return e
 
     def dispatch(self):
         # TODO: refactor this correctly. This is a quick fix for pos demo.