From 726c29084265b850c2516924d1fbcd47ea28432f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 28 Feb 2013 14:26:58 +0000 Subject: [PATCH] system: bogomips is spelled differently on ARM. --- python/pakfire/system.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/pakfire/system.py b/python/pakfire/system.py index 4c375cc9..53f01334 100644 --- a/python/pakfire/system.py +++ b/python/pakfire/system.py @@ -148,11 +148,13 @@ class System(object): def cpu_bogomips(self): cpuinfo = self.parse_cpuinfo() - bogomips = cpuinfo.get("bogomips", None) - try: + for key in ("bogomips", "BogoMIPS"): + bogomips = cpuinfo.get(key, None) + + if bogomips is None: + continue + return float(bogomips) * self.cpu_count - except: - pass def get_loadavg(self): return os.getloadavg() -- 2.39.2