diff --git a/src/pybind/ceph_rest_api.py b/src/pybind/ceph_rest_api.py index f69f1809d61..28a0419c33c 100755 --- a/src/pybind/ceph_rest_api.py +++ b/src/pybind/ceph_rest_api.py @@ -323,7 +323,7 @@ def make_response(fmt, output, statusmsg, errorcode): '''.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)