From 422f210f749053a6647a0e1dc3c5392da4a87dc2 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 28 Jun 2019 15:13:56 -0400 Subject: [PATCH] Handle adapters with null names Under some situations, null names are given for adapters, apply generic treatment to such devices. --- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 428071a7..2d63294a 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -964,8 +964,8 @@ class IpmiHandler(object): if newinf.get('information', None) and 'name' in newinf['information']: newinf = copy.deepcopy(newinf) del newinf['information']['name'] - if fnmatch(newinf['name'], 'Adapter ??:??:??') or fnmatch( - newinf['name'], 'PCIeGen? x*'): + if (fnmatch(newinf['name'], 'Adapter ??:??:??') or fnmatch( + newinf['name'], 'PCIeGen? x*') or not newinf['name']): myinf = newinf.get('information', {}) sdid = myinf.get('PCI Subsystem Device ID', None) svid = myinf.get('PCI Subsystem Vendor ID', None)