1 From e2b6025dea547bf8de4bd2b8056f2a8227c635f5 Mon Sep 17 00:00:00 2001
2 From: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Wed, 13 Jun 2018 20:56:41 +0200
4 Subject: [PATCH 1/2] Don't crash when /proc/cpuinfo doesn't have any
7 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 src/fireinfo/cpu.py | 9 +++++----
10 1 file changed, 5 insertions(+), 4 deletions(-)
12 diff --git a/src/fireinfo/cpu.py b/src/fireinfo/cpu.py
13 index 541575a..dc76caf 100644
14 --- a/src/fireinfo/cpu.py
15 +++ b/src/fireinfo/cpu.py
16 @@ -108,10 +108,11 @@ class CPU(object):
18 Return the model string of this CPU.
21 - return self.__cpuinfo["model_name"]
23 - return self.__cpuinfo["Processor"]
24 + for key in ("model_name", "Processor"):
26 + return self.__cpuinfo[key]