summaryrefslogtreecommitdiffstats
path: root/tools/systeminfo.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/systeminfo.py')
-rw-r--r--tools/systeminfo.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/systeminfo.py b/tools/systeminfo.py
index 62db852b..531f1c92 100644
--- a/tools/systeminfo.py
+++ b/tools/systeminfo.py
@@ -71,8 +71,9 @@ def get_nic():
output = subprocess.check_output('lspci', shell=True)
output = output.decode(locale.getdefaultlocale()[1])
for line in output.split('\n'):
- for nic_pciid in S.getValue('WHITELIST_NICS'):
- if line.startswith(nic_pciid):
+ for nic in S.getValue('NICS'):
+ # lspci shows PCI addresses without domain part, i.e. last 7 chars
+ if line.startswith(nic['pci'][-7:]):
nics.append(''.join(line.split(':')[2:]).strip())
return nics