From b25293d4194fe5b2546a49614785850f24faa100 Mon Sep 17 00:00:00 2001 From: Matt Nelson Date: Fri, 24 May 2024 09:54:17 -0500 Subject: [PATCH] Adds backslashes to fix python syntax warning (#117) Signed-off-by: Matt Nelson --- src/rpi-cpu2mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpi-cpu2mqtt.py b/src/rpi-cpu2mqtt.py index a27a07f..db57ada 100644 --- a/src/rpi-cpu2mqtt.py +++ b/src/rpi-cpu2mqtt.py @@ -90,7 +90,7 @@ def check_memory(): def check_cpu_temp(): - full_cmd = "cat /sys/class/thermal/thermal_zone*/temp 2> /dev/null | sed 's/\(.\)..$//' | tail -n 1" + full_cmd = "cat /sys/class/thermal/thermal_zone*/temp 2> /dev/null | sed 's/\\(.\\)..$//' | tail -n 1" try: p = subprocess.Popen(full_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0] cpu_temp = p.decode("utf-8").strip()