Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sonic_eeprom] Make compatible with Python 2 and 3 (sonic-net#127)
The `string` type has changed between Python 2 and 3. Therefore, the Python 3 version of this library is broken. This PR changes the data type of the raw EEPROM data to a `bytearray`, which is treated the same in both Python 2 and Python 3, and is technically a more appropriate data type for the raw bytes anyway. However, this PR could cause issues if any vendors are overriding the `read_eeprom_bytes()` or `read_eeprom()` functions and returning a `string`. Any vendors doing so will need to refactor their implementation to return a `bytearray` instead.
- Loading branch information