From 8ba63e112c273f6f5939f641c0d1695dcf070485 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 27 Sep 2024 10:22:58 +0200 Subject: [PATCH] bundles/sshmon: fix SyntaxWarning --- bundles/sshmon/files/check_cpu_stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/sshmon/files/check_cpu_stats b/bundles/sshmon/files/check_cpu_stats index c0985ef..f0c3a35 100644 --- a/bundles/sshmon/files/check_cpu_stats +++ b/bundles/sshmon/files/check_cpu_stats @@ -12,7 +12,7 @@ try: top_output = check_output(rf"top -b -n{ITERATIONS} -d1 | grep -i '^%cpu'", shell=True).decode('UTF-8') cpu_usage = {} - for value, identifier in findall('([0-9\.\,]{3,5}) ([a-z]{2})', top_output): + for value, identifier in findall(r'([0-9\.\,]{3,5}) ([a-z]{2})', top_output): if identifier not in cpu_usage: cpu_usage[identifier] = 0.0 cpu_usage[identifier] += float(value.replace(',', '.'))