diff options
author | Ruan HE <ruan.he@orange.com> | 2015-11-24 14:47:07 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-11-24 14:47:07 +0000 |
commit | 1b68469b9ebc726f0368983258e14f874a5652d5 (patch) | |
tree | 4a53eb5e0c2db6b1e8429a67b425b536201145eb /moonclient | |
parent | e5c89fa8e579665871c4ecbfb5a475c4af93b611 (diff) | |
parent | 3379813103a77a85c237229ec4d912c76e101ab6 (diff) |
Merge "Manage the case where the content from Keystone is empty."
Diffstat (limited to 'moonclient')
-rw-r--r-- | moonclient/moonclient/shell.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/moonclient/moonclient/shell.py b/moonclient/moonclient/shell.py index 4073a227..8343d86e 100644 --- a/moonclient/moonclient/shell.py +++ b/moonclient/moonclient/shell.py @@ -165,6 +165,8 @@ class MoonClient(App): pass content = resp.read() conn.close() + if len(content) == 0: + return {} try: content = json.loads(content) if "error" in content: @@ -180,7 +182,6 @@ class MoonClient(App): return content except ValueError: raise Exception("Getting an error while requiring {} ({})".format(url, content)) - # return {"content": content} def auth_keystone(self, username=None, password=None, host=None, port=None): """Send a new authentication request to Keystone |