Skip to content

Commit

Permalink
Fix for command. show interface transceiver eeprom -d Ethernet (sonic…
Browse files Browse the repository at this point in the history
…-net#955)

Make sure key is present in dom_info_dict and then only parse
else skip.
  • Loading branch information
abdosi authored Jun 21, 2020
1 parent fd7781b commit 5a13e0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/sfpshow
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class SFPShow(object):
ident = ' '
seperator = ": "
for key in sorted_key_table:
if dom_info_dict is not None and dom_info_dict[key] != 'N/A':
if dom_info_dict is not None and key in dom_info_dict and dom_info_dict[key] != 'N/A':
current_val = (ident + ident +
dom_value_map[key])
current_val = (current_val + seperator.rjust(len(seperator) +
Expand Down

0 comments on commit 5a13e0b

Please sign in to comment.