From 89ed431966b13ee0ca2cffc5c8a20e631be46037 Mon Sep 17 00:00:00 2001 From: schmidax <64590250+schmidax@users.noreply.github.com> Date: Fri, 8 Mar 2024 08:45:42 +0100 Subject: [PATCH] update returncode check of check_mk_agent --- src/checkmk_kube_agent/send_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checkmk_kube_agent/send_metrics.py b/src/checkmk_kube_agent/send_metrics.py index 9ef47c8..8084a17 100644 --- a/src/checkmk_kube_agent/send_metrics.py +++ b/src/checkmk_kube_agent/send_metrics.py @@ -374,7 +374,7 @@ def machine_sections_worker( stdout=subprocess.PIPE, ) as process: (out, err) = process.communicate(timeout=5) - if returncode != 0: + if process.returncode != 0: # we don't capture stderr so it's printed to stderr of this process # and hopefully contains a helpful error message... raise RuntimeError("Agent execution failed.")