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

[EEPROM] Add new function part_number_str to TlvInfoDecoder #121

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

keboliu
Copy link
Collaborator

@keboliu keboliu commented Sep 25, 2020

Add a new function to TlvInfoDecoder which can return device part number as a string.

@jleveque jleveque changed the title [EEPROM]Add new function part_number_str to TlvInfoDecoder [EEPROM] Add new function part_number_str to TlvInfoDecoder Sep 25, 2020
@jleveque jleveque merged commit 111dcf7 into sonic-net:master Sep 25, 2020
@jleveque
Copy link
Contributor

@keboliu: Should this be cherry-picked to 201911?

@keboliu
Copy link
Collaborator Author

keboliu commented Sep 27, 2020

@keboliu: Should this be cherry-picked to 201911?

yes, I set the label.

abdosi pushed a commit that referenced this pull request Oct 6, 2020
Add a new function to TlvInfoDecoder which can return device part number as a string.
@keboliu keboliu deleted the eeprom_base_extend branch January 2, 2021 01:26
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
Fixes the following crash introduced by sonic-net/sonic-platform-daemons#102:

```
01:33:00  ______________________ test_updater_thermal_check_min_max ______________________
01:33:00  
01:33:00      def test_updater_thermal_check_min_max():
01:33:00          chassis = MockChassis()
01:33:00      
01:33:00          thermal = MockThermal()
01:33:00          chassis.get_all_thermals().append(thermal)
01:33:00      
01:33:00          chassis.set_modular_chassis(True)
01:33:00          chassis.set_my_slot(1)
01:33:00          temperature_updater = TemperatureUpdater(SYSLOG_IDENTIFIER, chassis)
01:33:00      
01:33:00          temperature_updater.update()
01:33:00          slot_dict = temperature_updater.chassis_table.get('Thermal 1')
01:33:00  >       assert slot_dict['minimum_temperature'] == str(thermal.get_minimum_recorded())
01:33:00  E       TypeError: 'NoneType' object has no attribute '__getitem__'
01:33:00  
01:33:00  tests/test_thermalctld.py:341: TypeError
```

Signed-off-by: Petro Bratash <petrox.bratash@intel.com>

Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants