Merge b23c2493e9 into 0eb28ac3d8
This commit is contained in:
commit
302a3a3be4
1 changed files with 10 additions and 2 deletions
|
|
@ -263,7 +263,11 @@ class CPULatencyPlugin(hotplug.Plugin):
|
|||
# Possible other x86 vendors (from arch/x86/kernel/cpu/*):
|
||||
# "CentaurHauls", "CyrixInstead", "Geode by NSC", "HygonGenuine", "GenuineTMx86",
|
||||
# "TransmetaCPU", "UMC UMC UMC"
|
||||
cpu = procfs.cpuinfo()
|
||||
try:
|
||||
cpu = procfs.cpuinfo()
|
||||
except AttributeError as error:
|
||||
log.error("Unable to detect CPU: %s" % error)
|
||||
return
|
||||
vendor = cpu.tags.get("vendor_id")
|
||||
if vendor == "GenuineIntel":
|
||||
self._is_intel = True
|
||||
|
|
@ -316,7 +320,11 @@ class CPULatencyPlugin(hotplug.Plugin):
|
|||
|
||||
def _get_cpuinfo_flags(self):
|
||||
if self._flags is None:
|
||||
self._flags = procfs.cpuinfo().tags.get("flags", [])
|
||||
try:
|
||||
self._flags = procfs.cpuinfo().tags.get("flags", [])
|
||||
except AttributeError as error:
|
||||
log.error("failed to read flags: %s" % error)
|
||||
return []
|
||||
return self._flags
|
||||
|
||||
def _is_cpu_online(self, device):
|
||||
|
|
|
|||
Loading…
Reference in a new issue