Skip to content

Commit

Permalink
[sfputilbase|sfputilhelper] fix value unpack error due to port_alias_…
Browse files Browse the repository at this point in the history
…asic_map in portconfig.py file (sonic-net#116)

sfputilbase and sfputilhelper were not able to unpack the value correctly as get_port_config function was returning three variables including the new port_alias_map dictionary.

Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
  • Loading branch information
samaity committed Aug 30, 2020
1 parent 14c6e53 commit d2a47bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sonic_platform_base/sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):

(platform, hwsku) = device_info.get_platform_and_hwsku()
if(parse_fmt_platform_json):
ports, _ = get_port_config(hwsku, platform)
ports, _, _ = get_port_config(hwsku, platform)
if not ports:
print('Failed to get port config', file=sys.stderr)
sys.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion sonic_platform_base/sonic_sfp/sfputilhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):

(platform, hwsku) = device_info.get_platform_and_hwsku()
if(parse_fmt_platform_json):
ports, _ = get_port_config(hwsku, platform)
ports, _, _ = get_port_config(hwsku, platform)
if not ports:
print('Failed to get port config', file=sys.stderr)
sys.exit(1)
Expand Down

0 comments on commit d2a47bb

Please sign in to comment.