]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
system: bogomips is spelled differently on ARM.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Feb 2013 14:26:58 +0000 (14:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Feb 2013 14:26:58 +0000 (14:26 +0000)
python/pakfire/system.py

index 4c375cc94c22ae70286866fbd16f02b4c4b920f1..53f01334c0e8c0caa3e66bb897d92e5ccbe08d2c 100644 (file)
@@ -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()