Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tuned/plugins/plugin_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ def _check_arch(self):
# 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
Expand Down Expand Up @@ -295,7 +299,11 @@ def _check_amd_pstate(self):

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):
Expand Down