From ca18a8d231c9a1032c528fd347f689bd19c3b32e Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 27 Nov 2022 19:48:13 +0100 Subject: [PATCH] bundles/pretalx: ignore update check if no version was specified --- bundles/pretalx/metadata.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/pretalx/metadata.py b/bundles/pretalx/metadata.py index fe5abc1..3c52e15 100644 --- a/bundles/pretalx/metadata.py +++ b/bundles/pretalx/metadata.py @@ -50,12 +50,15 @@ defaults = { 'icinga2_api/pretalx/services', ) def icinga_check_for_new_release(metadata): + version = metadata.get('pretalx/version') + if '.' not in version: + return {} return { 'icinga2_api': { 'pretalx': { 'services': { 'PRETALX UPDATE': { - 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_pypi_for_new_release pretalx {}'.format(metadata.get('pretalx/version')), + 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_pypi_for_new_release pretalx {}'.format(version), 'vars.notification.mail': True, 'check_interval': '60m', },