Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[decode-syseeprom] fix getattribute check for some platforms #835

Merged
merged 1 commit into from
Mar 22, 2020

Conversation

mykolaf
Copy link
Collaborator

@mykolaf mykolaf commented Mar 11, 2020

Signed-off-by: Mykola Faryma mykolaf@mellanox.com

Fixes: #828
- What I did
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__.
- How I did it

- How to verify it

- Previous command output (if the output of a command-line utility has changed)

sudo decode-syseeprom
Traceback (most recent call last):
  File "/usr/bin/decode-syseeprom", line 175, in <module>
    exit(main())
  File "/usr/bin/decode-syseeprom", line 58, in main
    or t.getattr('read_eeprom_db', None) == None:
AttributeError: 'board' object has no attribute 'getattr'

- New command output (if the output of a command-line utility has changed)

sudo decode-syseeprom
TlvInfo Header:
   Id String:    TlvInfo
   Version:      1
   Total Length: 573
TLV Name             Code Len Value
-------------------- ---- --- -----

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
@mykolaf mykolaf changed the title [decode-syseeprom] fix getattribute check for sime platforms [decode-syseeprom] fix getattribute check for some platforms Mar 12, 2020
@akokhan
Copy link
Contributor

akokhan commented Mar 14, 2020

retest this please

1 similar comment
@akokhan
Copy link
Contributor

akokhan commented Mar 14, 2020

retest this please

@mykolaf
Copy link
Collaborator Author

mykolaf commented Mar 16, 2020

The issue was introduced by commit
ATM it's not included in 201911 branch, so there is no need to Include this fix in 201911 branch)

@mykolaf

This comment has been minimized.

2 similar comments
@akokhan
Copy link
Contributor

akokhan commented Mar 16, 2020

retest this please

@akokhan
Copy link
Contributor

akokhan commented Mar 17, 2020

retest this please

@lguohan lguohan merged commit 727b499 into sonic-net:master Mar 22, 2020
@abdosi
Copy link
Contributor

abdosi commented Mar 24, 2020

@mykolaf Please Create PR for 201911 as cherry-pick is not clean

@abdosi
Copy link
Contributor

abdosi commented Apr 19, 2020

@mykolaf Remainder again.
@liat-grozovik

abdosi pushed a commit to abdosi/sonic-utilities that referenced this pull request Aug 4, 2020
…et#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 <mykolaf@mellanox.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
6cfb3ecb0248768da0a91e5f7fb4477c5da7eb4e (HEAD -> 201911, origin/201911) [build]: allow to use extra inc/lib location to build the package (sonic-net#595)
40d34872d3b7f354adac67f084eebf6ee467f779 Merge pull request sonic-net#846 from xumia/azp-201911
76ac50f147a7d820b19d8d7628a67f2fe4f5159b Disable the build test
6c9cf655b8b5b152cab1d578e05eddf8238b81b0 Fix branch reference error
ca8d81d37a9b0294098f161b036d330d9ff461e0 [ci]: download artifacts from master branch (sonic-net#768)
0cbf4d55c67a9f8f52715f95536f3588acf06c4a [ci]: use sonicbld pool (sonic-net#766)
b6f1265ee9bd86f8a5e909a6f1e9b2384497c906 [ci]: add build for arm64 and armhf (sonic-net#757)
9ec0a7da64d479b124815edc5b505fb88b2532a0 CI: add azure pipeline CI/CD (sonic-net#754)
1436dbe02cd3c56f796c6b3398d4075cd05d97e0 Fix RIF issue (sonic-net#835)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error when executing "decode-syseeprom" command
6 participants