fix: None type cannot be used in a join() function ()

This commit is contained in:
John Seekins 2021-10-18 14:18:56 -06:00 committed by GitHub
parent 72fff0a366
commit f23bf5f9a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,8 @@ class ZabbixEventAck(PluginBase):
r = self.zapi.event.get(objectids=trigger_id, acknowledged=False, output='extend', sortfield='clock', sortorder='DESC', limit=10)
event_ids = [e['eventid'] for e in r]
except ZabbixAPIException:
event_ids = None
LOG.error(f"No eventids retrieved from Zabbix for {trigger_id}")
return
LOG.debug('Zabbix: status=ack; triggerId %s => eventIds %s', trigger_id, ','.join(event_ids))
@ -87,7 +88,8 @@ class ZabbixEventAck(PluginBase):
r = self.zapi.event.get(objectids=trigger_id, output='extend', sortfield='clock', sortorder='DESC', limit=10)
event_ids = [e['eventid'] for e in r]
except ZabbixAPIException:
event_ids = None
LOG.error(f"No eventids retrieved from Zabbix for {trigger_id}")
return
LOG.debug('Zabbix: status=closed; triggerId %s => eventIds %s', trigger_id, ','.join(event_ids))