Skip to content

Commit cbf930b

Browse files
committed
Fix matching when MAC is None
1 parent ac05724 commit cbf930b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

module/sources/openstack/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ def add_device_vm_to_inventory(self, object_type, object_data, pnic_data=None, v
732732
# on VMs vnic data is used, on physical devices pnic data is used
733733
mac_source_data = vnic_data if object_type == NBVM else pnic_data
734734

735-
nic_macs = [x.get("mac_address") for x in mac_source_data.values()]
735+
nic_macs = [x.get("mac_address") for x in mac_source_data.values() if x.get("mac_address") is not None]
736736

737737
device_vm_object = self.get_object_based_on_macs(object_type, nic_macs)
738738

0 commit comments

Comments
 (0)