Code Review
/
moon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
fca74d4
)
Manage the case where the content from Keystone is empty.
71/3571/1
author
asteroide
<thomas.duval@orange.com>
Tue, 24 Nov 2015 14:06:24 +0000
(15:06 +0100)
committer
asteroide
<thomas.duval@orange.com>
Tue, 24 Nov 2015 14:06:24 +0000
(15:06 +0100)
Change-Id: I0bb6ae144436114c569024115f9c835f7aab9e1d
moonclient/moonclient/shell.py
patch
|
blob
|
history
diff --git
a/moonclient/moonclient/shell.py
b/moonclient/moonclient/shell.py
index
4073a22
..
8343d86
100644
(file)
--- 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