Mercurial > odfcast > odfcast
comparison odfcast/convert.py @ 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 |
comparison
equal
deleted
inserted
replaced
92:2200ae1e7bdb | 93:48dabf4bf680 |
---|---|
97 | 97 |
98 class MergeErrorResponse(ErrorResponse): | 98 class MergeErrorResponse(ErrorResponse): |
99 | 99 |
100 MERGE_ERROR_CODE = 300 | 100 MERGE_ERROR_CODE = 300 |
101 | 101 |
102 def __init__(self, details, error_code=MERGE_ERROR_CODE): | 102 def __init__(self, details, error_code=MERGE_ERROR_CODE, |
103 http_error_code=500): | |
103 super(MergeErrorResponse, self).__init__( | 104 super(MergeErrorResponse, self).__init__( |
104 title="MergeError", error_code=error_code, details=details, | 105 title="MergeError", error_code=error_code, details=details, |
105 http_error_code=500) | 106 http_error_code=http_error_code) |
106 | 107 |
107 | 108 |
108 class ConvertView(MethodView): | 109 class ConvertView(MethodView): |
109 | 110 |
110 def __init__(self, pyuno_driver_name="", hostname="localhost", port=2001): | 111 def __init__(self, pyuno_driver_name="", hostname="localhost", port=2001): |