2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-25 04:32:11 +00:00

Do not trigger AttributeError on Null event

In the scenario where event is present but 'None', handle the situation more gracefully, by ignoring it's existance.
This commit is contained in:
Jarrod Johnson 2016-05-09 13:59:50 -04:00
parent d5e833480e
commit 14f6fabe0a

View File

@ -53,7 +53,7 @@ def format_event(evt):
dscparts.append(evt['component_type'])
if 'component' in evt and evt['component'] is not None:
dscparts.append(evt['component'])
if 'event' in evt:
if 'event' in evt and evt['event']:
evttext = evt['event']
try:
if evttext.startswith(evt['component'] + ' - '):