Browse Source

Explicitly initialize empty dict when getting GUIDs

For MLNX5 devices need to explicity initialize empty
dict when fetching them via netdev API fails.

Change-Id: I7607f145d24864e3973f8dbc7debd6adba42d598
changes/84/707384/1
Adrian Chiris 1 week ago
parent
commit
c0d49ce7f3
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      networking_mlnx/eswitchd/utils/ib_utils.py

+ 1
- 0
networking_mlnx/eswitchd/utils/ib_utils.py View File

@@ -167,6 +167,7 @@ class IbUtils(object):
if macs_map is None:
LOG.debug("Failed to get vf guid via netdev API, "
"attempting to get vf guid via sysfs.")
macs_map = {}
for vf_idx in vf_idxs:
guid_path = (
constants.MLNX5_GUID_NODE_PATH % {'module': pf_mlx_name,

Loading…
Cancel
Save