diff options
author | Shrivaibavi Raghaventhiran <sraghave@redhat.com> | 2018-11-26 16:15:22 -0500 |
---|---|---|
committer | Shrivaibavi Raghaventhiran <sraghave@redhat.com> | 2018-11-26 16:41:42 -0500 |
commit | 537e5d5e54869a74133398b59b054877e02fa022 (patch) | |
tree | 5499e1853eb4df509d7a0084a5d2e0d60abab148 /glustolibs-gluster-gd2/glustolibs | |
parent | 9082934b1afc5618e2aa07ad6296aa79c0f17e17 (diff) |
updated the return logic of Rest Client
Change-Id: Iff1e0592bb9f49f52276058e9652c2b90ada79e2
Signed-off-by: Shrivaibavi Raghaventhiran <sraghave@redhat.com>
Diffstat (limited to 'glustolibs-gluster-gd2/glustolibs')
-rw-r--r-- | glustolibs-gluster-gd2/glustolibs/gluster/rest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/glustolibs-gluster-gd2/glustolibs/gluster/rest.py b/glustolibs-gluster-gd2/glustolibs/gluster/rest.py index 20421c8..f687ea3 100644 --- a/glustolibs-gluster-gd2/glustolibs/gluster/rest.py +++ b/glustolibs-gluster-gd2/glustolibs/gluster/rest.py @@ -119,10 +119,10 @@ class RestClient(object): headers=headers, verify=self.verify) if resp.status_code != expected_status_code: - return (resp.status_code, None, json.dumps(resp.json())) + return (1, None, json.dumps(resp.json())) if resp.status_code == 204: - return resp.status_code, {} + return (resp.status_code, None, None) - return (resp.status_code, json.dumps(resp.json()), None) + return (0, json.dumps(resp.json()), None) |