Skip to content

Commit 1fc2c3d

Browse files
Fix 'show platform eeprom' on virtual switch (sonic-net#794)
add kvm to platforms which do not support syseeprom db and check for the 'read_syseeprom_db' method availibilty to avoid same issue on other platforms
1 parent 34b5819 commit 1fc2c3d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/decode-syseeprom

+6-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ def main():
3636

3737
platform_path = '/'.join([PLATFORM_ROOT, platform])
3838

39-
# Currently, don't support eeprom db on Arista platform
40-
if 'arista' in platform_path:
41-
support_eeprom_db = False
4239
#
4340
# Currently we only support board eeprom decode.
4441
#
@@ -55,6 +52,12 @@ def main():
5552
class_ = getattr(m, 'board')
5653
t = class_('board', '','','')
5754

55+
# Currently, don't support eeprom db on Arista platform
56+
platforms_without_eeprom_db = ['arista', 'kvm']
57+
if any(platform in platform_path for platform in platforms_without_eeprom_db)\
58+
or t.getattr('read_eeprom_db', None) == None:
59+
support_eeprom_db = False
60+
5861
#
5962
# execute the command
6063
#

0 commit comments

Comments
 (0)