# HG changeset patch # User Sylvain Thénault # Date 1347287148 -7200 # Node ID fef0b8214fcfc5bf151f7beb7b3d1a2d076461ba # Parent 8db29e17dd336471caa55f415e9016108af12198 [web app] move set of status_out into validation_error_handler to ease readability diff -r 8db29e17dd33 -r fef0b8214fcf web/application.py --- a/web/application.py Mon Sep 10 16:24:32 2012 +0200 +++ b/web/application.py Mon Sep 10 16:25:48 2012 +0200 @@ -461,7 +461,6 @@ result = self.notfound_content(req) req.status_out = ex.status except ValidationError, ex: - req.status_out = httplib.CONFLICT result = self.validation_error_handler(req, ex) except RemoteCallFailed, ex: result = self.ajax_error_handler(req, ex) @@ -480,7 +479,7 @@ except (AuthenticationError, LogOut): # the rollback is handled in the finally raise - ### Last defence line + ### Last defense line except BaseException, ex: result = self.error_handler(req, ex, tb=True) finally: @@ -526,6 +525,7 @@ req.headers_out.setHeader('location', str(location)) req.status_out = httplib.SEE_OTHER return '' + req.status_out = httplib.CONFLICT return self.error_handler(req, ex, tb=False) def error_handler(self, req, ex, tb=False):