"""
Return the bogomips of this CPU.
"""
- try:
- bogomips = self.__cpuinfo["bogomips"]
- except KeyError:
- bogomips = self.__cpuinfo["BogoMIPS"]
+ bogomips = None
+
+ for key in ("bogomips", "BogoMIPS"):
+ try:
+ bogomips = self.__cpuinfo[key]
+ except KeyError:
+ continue
- return float(bogomips)
+ if bogomips:
+ return float(bogomips)
@property
def model(self):
"model_string" : self.cpu.model_string,
"stepping" : self.cpu.stepping,
"flags" : self.cpu.flags,
- "bogomips" : self.cpu.bogomips,
"speed" : self.cpu.speed,
"family" : self.cpu.family,
"count" : self.cpu.count
}
+ if self.cpu.bogomips:
+ p["bogomips"] = self.cpu.bogomips
+
p["network"] = {
"green" : self.network.has_green(),
"blue" : self.network.has_blue(),