From 38760d5553d449001269588a34415d71455e7acd Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 20 Jul 2025 09:33:15 +0200 Subject: [PATCH] updated zabbix state --- states/zabbix/scripts/apt.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/states/zabbix/scripts/apt.py b/states/zabbix/scripts/apt.py index 60bd634..874b39e 100644 --- a/states/zabbix/scripts/apt.py +++ b/states/zabbix/scripts/apt.py @@ -56,8 +56,13 @@ def isSecurityUpgrade(pkg, depcache): return False def main(): - pkgs = get_updates() - sys.exit(str(len(pkgs))) + ret = -1 + try: + pkgs = get_updates() + ret = len(pkgs) + except Exception as e: + print(f"{e}", file=sys.stderr) + print(ret) if __name__ == "__main__": main()