From 7f9394b33a3e1a2dcfb43f16ae9e67636f1835ba Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 11 Oct 2016 16:46:01 -0400 Subject: [PATCH] Handle events without timestamps If an event is missing a timestamp, omit rather than stack trace --- confluent_client/bin/nodeeventlog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_client/bin/nodeeventlog b/confluent_client/bin/nodeeventlog index b8fc22ad..e95f31f1 100644 --- a/confluent_client/bin/nodeeventlog +++ b/confluent_client/bin/nodeeventlog @@ -45,7 +45,7 @@ exitcode = 0 def format_event(evt): retparts = [] - if 'timestamp' in evt: + if 'timestamp' in evt and evt['timestamp'] is not None: display = dt.strptime(evt['timestamp'], '%Y-%m-%dT%H:%M:%S') retparts.append(display.strftime('%m/%d/%Y %H:%M:%S')) dscparts = []