summaryrefslogtreecommitdiff
path: root/src/op_mode/cpu_summary.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-06-30 22:11:52 +0200
committerChristian Poessinger <christian@poessinger.com>2018-06-30 22:11:52 +0200
commit76e97115e46d992eab77120967db9d0fb83c6a38 (patch)
treea64b630893418fe8772b8e4cd168471e79770d45 /src/op_mode/cpu_summary.py
parent5edf3e5d876a13143ca01c38034b19035b9f5f20 (diff)
downloadvyos-1x-76e97115e46d992eab77120967db9d0fb83c6a38.tar.gz
vyos-1x-76e97115e46d992eab77120967db9d0fb83c6a38.zip
op_mode: cpu_summary: fix bug (no war string) reported by sonarcube
Diffstat (limited to 'src/op_mode/cpu_summary.py')
-rwxr-xr-xsrc/op_mode/cpu_summary.py2
1 files changed, 1 insertions, 1 deletions
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'])))