Skip to content

Commit 727b499

Browse files
authored
[decode-syseeprom] fix getattribute check for sime platforms (sonic-net#835)
For some platforms which implement the eeprom plugin by inheriting from TlvInfoDecoder, the line t.getattr('read_eeprom_db', None) == None: results in an error: AttributeError: 'board' object has no attribute 'getattr' The cause for that is that TlvInfoDecoder inherits from object, and looks like for object and derived classes there is no __getattr__. Signed-off-by: Mykola Faryma <[email protected]>
1 parent db78cb6 commit 727b499

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/decode-syseeprom

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def main():
5555
# Currently, don't support eeprom db on Arista platform
5656
platforms_without_eeprom_db = ['arista', 'kvm']
5757
if any(platform in platform_path for platform in platforms_without_eeprom_db)\
58-
or t.getattr('read_eeprom_db', None) == None:
58+
or getattr(t, 'read_eeprom_db', None) == None:
5959
support_eeprom_db = False
6060

6161
#

0 commit comments

Comments
 (0)