From 735cc268d115f059cbc7ed878627694d238520c6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 16 Mar 2015 10:15:27 -0400 Subject: [PATCH] Have confetty better handle noderange output Have confetty print_result make a reasonable assumption to have noderange based output show relevant node and output. --- confluent_client/bin/confetty | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index 0a558e94..e76f7ee5 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -248,11 +248,14 @@ def print_result(res): attrstr = '%s="%s"' % (key, res[key]['value']) elif 'value' in res[key] and res[key]['value'] is None: attrstr = '%s=""' % key + elif 'isset' in res[key] and res[key]['isset']: + attrstr = '%s="********"' % key + elif 'isset' in res[key] or not res[key]: + attrstr = '%s=""' % key else: - if 'isset' in res[key] and res[key]['isset']: - attrstr = '%s="********"' % key - else: - attrstr = '%s=""' % key + sys.stdout.write('{0}: '.format(key)) + print_result(res[key]) + continue if res[key] is not None and 'inheritedfrom' in res[key]: notes.append( 'Inherited from %s' % res[key]['inheritedfrom'])