2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Fix display of 'None' attributes

Previously, assumption was that the response data would be a dict.  This
is not always the case.  If None is encountered, treat it as a blank attribute.
This commit is contained in:
Jarrod Johnson 2014-02-22 14:18:20 -05:00
parent 499377271c
commit 71f6199b2e

View File

@ -187,7 +187,9 @@ def do_command(command, server):
print item["href"]
else: # generic attributes to list
for key in res.iterkeys():
if 'value' in res[key]:
if res[key] is None:
print "%s=" % key
elif 'value' in res[key]:
print "%s=%s" % (key, res[key]['value'])
else:
if 'isset' in res[key] and res[key]['isset']: