Update opnsense_checkmk_agent.py

This commit is contained in:
Thorsten Spille 2022-01-19 18:19:09 +01:00 committed by GitHub
parent e8e1d9022d
commit 602562e1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,10 @@ class checkmk_checker(object):
_ret = filter(lambda x: x.get("common_name") == cn and x.get("caref") == caref,self._certificate_store.values())
else:
_ret = filter(lambda x: x.get("common_name") == cn,self._certificate_store.values())
return next(_ret) if _ret else {}
try:
return next(_ret)
except StopIteration:
return {}
def get_opnsense_interfaces(self):
_ifs = {}