From 76e97115e46d992eab77120967db9d0fb83c6a38 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 30 Jun 2018 22:11:52 +0200 Subject: op_mode: cpu_summary: fix bug (no war string) reported by sonarcube --- src/op_mode/cpu_summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/op_mode') diff --git a/src/op_mode/cpu_summary.py b/src/op_mode/cpu_summary.py index 3da5835e9..7324c75ad 100755 --- a/src/op_mode/cpu_summary.py +++ b/src/op_mode/cpu_summary.py @@ -18,7 +18,7 @@ cpu_data['cpu_number'] = len(data['processor']) cpu_data['models'] = list(set(data['model name'])) # Strip extra whitespace from CPU model names, /proc/cpuinfo is prone to that -cpu_data['models'] = map(lambda s: re.sub('\s+', ' ', s), cpu_data['models']) +cpu_data['models'] = map(lambda s: re.sub(r'\s+', ' ', s), cpu_data['models']) print("CPU(s): {0}".format(cpu_data['cpu_number'])) print("CPU model(s): {0}".format(",".join(cpu_data['models']))) -- cgit v1.2.3