From e64fcfd6014205184c21124f6570215ed908c233 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 20 Jul 2022 11:30:00 -0400 Subject: T2719: fix a stray empty key in the CPU data dict --- python/vyos/cpu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- cgit v1.2.3