handle sockets with no cpu installed. should fix #117 (#118)

This commit is contained in:
ThomasADavis 2020-02-21 00:13:02 -08:00 committed by GitHub
parent 5590f39131
commit dc4f90d490
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,13 +103,14 @@ class LSHW():
self.disks.append(d)
def find_cpus(self, obj):
c = {}
c["product"] = obj["product"]
c["vendor"] = obj["vendor"]
c["description"] = obj["description"]
c["location"] = obj["slot"]
if "product" in obj:
c = {}
c["product"] = obj["product"]
c["vendor"] = obj["vendor"]
c["description"] = obj["description"]
c["location"] = obj["slot"]
self.cpus.append(c)
self.cpus.append(c)
def find_memories(self, obj):
if "children" not in obj: