handle sockets with no cpu installed. should fix #117 #118
1 changed files with 7 additions and 6 deletions
|
@ -103,13 +103,14 @@ class LSHW():
|
||||||
self.disks.append(d)
|
self.disks.append(d)
|
||||||
|
|
||||||
def find_cpus(self, obj):
|
def find_cpus(self, obj):
|
||||||
c = {}
|
if "product" in obj:
|
||||||
c["product"] = obj["product"]
|
c = {}
|
||||||
c["vendor"] = obj["vendor"]
|
c["product"] = obj["product"]
|
||||||
c["description"] = obj["description"]
|
c["vendor"] = obj["vendor"]
|
||||||
c["location"] = obj["slot"]
|
c["description"] = obj["description"]
|
||||||
|
c["location"] = obj["slot"]
|
||||||
|
|
||||||
self.cpus.append(c)
|
self.cpus.append(c)
|
||||||
|
|
||||||
def find_memories(self, obj):
|
def find_memories(self, obj):
|
||||||
if "children" not in obj:
|
if "children" not in obj:
|
||||||
|
|
Loading…
Reference in a new issue