1
0
Fork 0

Merge pull request #277 from olysonek/cpu-comparison-fix

cpu: Fix string comparisons
This commit is contained in:
Jaroslav Škarvada 2020-06-04 19:32:15 +02:00 committed by GitHub
commit d84ac30f9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,9 +73,9 @@ class CPULatencyPlugin(base.Plugin):
# "TransmetaCPU", "UMC UMC UMC"
cpu = procfs.cpuinfo()
vendor = cpu.tags.get("vendor_id")
if vendor is "GenuineIntel":
if vendor == "GenuineIntel":
self._is_intel = True
elif vendor is "AuthenticAMD" or vendor is "HygonGenuine":
elif vendor == "AuthenticAMD" or vendor == "HygonGenuine":
self._is_amd = True
else:
# We always assign Intel, unless we know better