Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed eeprom_tlvinfo.py to make it Python2/Python3 compatible (sonic-…
…net#155) This PR fixes eeprom_tlvinfo.py to make it compatible with both Python2 & Python3. The current implementation causes runtime issue as follows: ``` Dec 14 12:04:34.908841 sonic WARNING pmon#syseepromd[51]: Failed to load platform-specific eeprom from sonic_platform package due to UnicodeDecodeError('ascii', '*\x02\x00\x8c', 3, 4, 'ordinal not in range(128)') Dec 14 12:04:34.910093 sonic NOTICE swss#orchagent: :- doPortTask: Set port Ethernet56 admin status to up Dec 14 12:04:34.923442 sonic ERR pmon#syseepromd[51]: Failed to load platform-specific eeprom implementation: UnicodeDecodeError('ascii', '*\x02\x00\x8c', 3, 4, 'ordinal not in range(128)') Dec 14 12:04:34.925628 sonic NOTICE swss#orchagent: :- doPortTask: Set port Ethernet60 MTU to 9100 Dec 14 12:04:34.939277 sonic NOTICE swss#orchagent: :- doPortTask: Set port Ethernet60 fec to rs Dec 14 12:04:34.943819 sonic NOTICE swss#orchagent: :- doPortTask: Set port Ethernet60 admin status to up ``` This cause `syseepromd` crash: ``` Dec 14 12:04:43.194489 sonic INFO pmon#supervisord 2020-12-14 12:04:34,651 INFO spawned: 'syseepromd' with pid 51 Dec 14 12:04:43.194489 sonic INFO pmon#supervisord 2020-12-14 12:04:34,955 INFO exited: syseepromd (exit status 5; not expected) ``` Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
- Loading branch information