Skip to content

Commit 5a13e0b

Browse files
authored
Fix for command. show interface transceiver eeprom -d Ethernet (sonic-net#955)
Make sure key is present in dom_info_dict and then only parse else skip.
1 parent fd7781b commit 5a13e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/sfpshow

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class SFPShow(object):
141141
ident = ' '
142142
seperator = ": "
143143
for key in sorted_key_table:
144-
if dom_info_dict is not None and dom_info_dict[key] != 'N/A':
144+
if dom_info_dict is not None and key in dom_info_dict and dom_info_dict[key] != 'N/A':
145145
current_val = (ident + ident +
146146
dom_value_map[key])
147147
current_val = (current_val + seperator.rjust(len(seperator) +

0 commit comments

Comments
 (0)