From 71f6199b2e6e73af2987aad219f3ce1396f41838 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sat, 22 Feb 2014 14:18:20 -0500 Subject: [PATCH] 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. --- bin/confetty | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/confetty b/bin/confetty index b37736af..e7d187ca 100755 --- a/bin/confetty +++ b/bin/confetty @@ -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']: