From 9dab77e93c6787b723cdb3a2d043034a39f365bd Mon Sep 17 00:00:00 2001 From: Jarrod Johnon Date: Tue, 4 Nov 2014 10:12:37 -0500 Subject: [PATCH] Correct confetty displaying stale error information After implementing timestamps, error data was erroneously persisted. Address by deleting the state once consumed in constructing the relevant status string. --- confluent_client/bin/confetty | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index 65040e3c..832d8bed 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -83,6 +83,9 @@ def updatestatus(stateinfo={}): info.append(laststate['connectstate']) if 'error' in laststate: info.append(laststate['error']) + # error will be repeated if relevant + # avoid keeping it around as stale + del laststate['error'] if 'clientcount' in laststate and laststate['clientcount'] != 1: info.append('clients: %d' % laststate['clientcount']) if 'bufferage' in stateinfo and stateinfo['bufferage'] is not None: