Make lshw scrpping more resilient #292

Merged
sinavir merged 2 commits from sinavir/fix_gpu_without_vendor into master 2024-10-21 10:15:27 +02:00
Showing only changes of commit f512e7a0a9 - Show all commits

View file

@ -77,11 +77,11 @@ class LSHW():
# newer versions of lshw can return a list of names, see issue #227
if not isinstance(i["name"], list):
if i["name"].startswith("unknown"):
unkn_intfs.push(i)
unkn_intfs.append(i)
else:
for j in i["name"]:
if j.startswith("unknown"):
unkn_intfs.push(j)
unkn_intfs.append(j)
unkn_name = "unknown{}".format(len(unkn_intfs))
self.interfaces.append({