make sure you only update pci data if there is a match

This commit is contained in:
Brian Coca 2015-08-05 09:43:55 -04:00
parent faf4c3bb6c
commit 2b9b3a08a1

View file

@ -1048,7 +1048,8 @@ class LinuxHardware(Hardware):
pciid = m.group(1) pciid = m.group(1)
did = re.escape(pciid) did = re.escape(pciid)
m = re.search("^" + did + "\s(.*)$", pcidata, re.MULTILINE) m = re.search("^" + did + "\s(.*)$", pcidata, re.MULTILINE)
d['host'] = m.group(1) if m:
d['host'] = m.group(1)
d['holders'] = [] d['holders'] = []
if os.path.isdir(sysdir + "/holders"): if os.path.isdir(sysdir + "/holders"):