From 4aeb73a5e6d46f970dbd684a58f795d379a04bd9 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Thu, 25 Jul 2013 21:42:19 -0700 Subject: [PATCH] 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 --- src/pybind/ceph_rest_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)