mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
ceph_rest_api.py: reversed test for failed request
A failed request has a response code *outside* the range (200, 300], not within it. Signed-off-by: Dan Mick <dan.mick@inktank.com>
This commit is contained in:
parent
47d0937ccb
commit
4aeb73a5e6
@ -323,7 +323,7 @@ def make_response(fmt, output, statusmsg, errorcode):
|
||||
</status>
|
||||
</response>'''.format(response, xml.sax.saxutils.escape(statusmsg))
|
||||
else:
|
||||
if 200 <= errorcode < 300:
|
||||
if not 200 <= errorcode < 300:
|
||||
response = response + '\n' + statusmsg + '\n'
|
||||
|
||||
return flask.make_response(response, errorcode)
|
||||
|
Loading…
Reference in New Issue
Block a user