[web app] move set of status_out into validation_error_handler to ease readability
--- 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):