changeset 93:48dabf4bf680

Make http_error_code a parameter of the MergeErrorResponse constructor. It defaults to 500, the value previously hard-coded in the call to the super class constructor. This change will allow us to specify other error codes in places where 500 is not useful. Part of mpuls/issue6009
author Bernhard Herzog <bh@intevation.de>
date Fri, 28 Apr 2017 19:06:14 +0200
parents 2200ae1e7bdb
children 2ef34abbad8d
files odfcast/convert.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/odfcast/convert.py	Fri Apr 28 19:03:36 2017 +0200
+++ b/odfcast/convert.py	Fri Apr 28 19:06:14 2017 +0200
@@ -99,10 +99,11 @@
 
     MERGE_ERROR_CODE = 300
 
-    def __init__(self, details, error_code=MERGE_ERROR_CODE):
+    def __init__(self, details, error_code=MERGE_ERROR_CODE,
+                 http_error_code=500):
         super(MergeErrorResponse, self).__init__(
             title="MergeError", error_code=error_code, details=details,
-            http_error_code=500)
+            http_error_code=http_error_code)
 
 
 class ConvertView(MethodView):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)