From bc569a11afc4ffe2f4293c6ac574a2431a51eea2 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Tue, 13 Nov 2018 18:23:53 +0100 Subject: [PATCH] [modules/sensors] Fix regex fixes #308 --- bumblebee/modules/sensors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/sensors.py b/bumblebee/modules/sensors.py index f575aff..92f3feb 100644 --- a/bumblebee/modules/sensors.py +++ b/bumblebee/modules/sensors.py @@ -65,7 +65,7 @@ class Module(bumblebee.engine.Module): output = bumblebee.util.execute("sensors -u") if self._match_pattern: temp_pattern = self.parameter("match", "temp1_input") - match = re.search(r"{}.+{}".format(self._match_pattern, temp_pattern), output.replace("\n", "")) + match = re.search(r"{}.+{}:\s*([\d.]+)$".format(self._match_pattern, temp_pattern), output.replace("\n", "")) if match: return int(float(match.group(1))) else: