Skip to contentSkip to conversation

rteval: misc.py: cpuinfo: set default value for 'model name'

PATCH New Anders Roxell 1 participant 1 message Oct 15, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rteval: misc.py: cpuinfo: set default value for 'model name'

Set a default value to 'unknown CPU' for 'model name'. If 'cat /proc/cpuinfo' don't provide a 'model name' there will be a default set.

---
 rteval/misc.py | 2 ++
 1 file changed, 2 insertions(+)
rteval/misc.py +2 -0
index 0dd361ff19fd..d99b3c20ecda 100644
@@ -75,6 +75,8 @@ def cpuinfo():
         if key == 'processor':
             core = val
             info[core] = {}
+            # default model name if there isn't any in /proc/cpuinfo
+            info[core]["model name"] = "unknown CPU"
             continue
         info[core][key] = val
     return info
Signature · 1 line
2.28.0