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:
Dan Mick 2013-07-25 21:42:19 -07:00
parent 47d0937ccb
commit 4aeb73a5e6

View File

@ -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)