summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2022-07-20 11:30:00 -0400
committerDaniil Baturin <daniil@vyos.io>2022-07-20 11:30:00 -0400
commite64fcfd6014205184c21124f6570215ed908c233 (patch)
treef94c4b6ba0e5f05df4025c1629720afc9826de85
parent8d8c14b53408aec3011fbf33c201fda4926248bb (diff)
downloadvyos-1x-e64fcfd6014205184c21124f6570215ed908c233.tar.gz
vyos-1x-e64fcfd6014205184c21124f6570215ed908c233.zip
T2719: fix a stray empty key in the CPU data dict
-rw-r--r--python/vyos/cpu.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/cpu.py b/python/vyos/cpu.py
index a0ef864be..488ae79fb 100644
--- a/python/vyos/cpu.py
+++ b/python/vyos/cpu.py
@@ -32,7 +32,8 @@ import re
def _read_cpuinfo():
with open('/proc/cpuinfo', 'r') as f:
- return f.readlines()
+ lines = f.read().strip()
+ return re.split(r'\n+', lines)
def _split_line(l):
l = l.strip()