[RTEVAL PATCH] rteval: misc.py: cpuinfo: set default value for 'model name'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx>
---
 rteval/misc.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rteval/misc.py b/rteval/misc.py
index 0dd361ff19fd..d99b3c20ecda 100644
--- a/rteval/misc.py
+++ b/rteval/misc.py
@@ -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
-- 
2.28.0




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux