From b39ae429557001a8708df6e40ecfe7ead2e44202 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 10 Feb 2017 16:41:47 -0500 Subject: [PATCH] Add debug of broken expression to nodelist If an expression is invalid, have nodelist give the error data allowing the user to see and potentially take action. --- confluent_client/bin/nodelist | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_client/bin/nodelist b/confluent_client/bin/nodelist index 50245628..6cff5dcd 100755 --- a/confluent_client/bin/nodelist +++ b/confluent_client/bin/nodelist @@ -76,7 +76,11 @@ if len(args) > 1: attrout = '{0}: {1}: ********'.format(node, attr) else: attrout = '{0}: {1}:'.format(node, attr) - if options.blame: + elif 'broken' in currattr: + attrout = '{0}: {1}: *ERROR* BROKEN EXPRESSION: ' \ + '{2}'.format(node, attr, + currattr['broken']) + if options.blame or 'broken' in currattr: blamedata = [] if 'inheritedfrom' in currattr: blamedata.append('inherited from group {0}'.format(