# HG changeset patch # User Bernhard Herzog # Date 1493399174 -7200 # Node ID 48dabf4bf680b55fd50512e2af96980e1a01e427 # Parent 2200ae1e7bdbf3f735b7e78fcccdbaaa81cf9349 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 diff -r 2200ae1e7bdb -r 48dabf4bf680 odfcast/convert.py --- 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):