48908b1c5a
The following error message is observed during chassis object being destroyed "Exception ignored in: <function Chassis.__del__ at 0x7fd22165cd08> Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/sonic_platform/chassis.py", line 83, in __del__ ImportError: sys.meta_path is None, Python is likely shutting down The chassis tries to import deinitialize_sdk_handle during being destroyed for the purpose of releasing the sdk_handle. However, importing another module during shutting down can cause the error because some of the fundamental infrastructures are no longer available." This error occurs when a chassis object is created and then destroyed in the Python shell. - How I did it To fix it, record the deinitialize_sdk_handle in the chassis object when sdk_handle is being initialized and call the deinitialize handler when the chassis object is being destroyed - How to verify it Manually test. |
||
---|---|---|
.. | ||
__init__.py | ||
chassis.py | ||
component.py | ||
device_data.py | ||
eeprom.py | ||
fan_drawer.py | ||
fan.py | ||
led.py | ||
platform.py | ||
psu.py | ||
sfp_event.py | ||
sfp.py | ||
thermal_actions.py | ||
thermal_conditions.py | ||
thermal_infos.py | ||
thermal_manager.py | ||
thermal.py | ||
utils.py | ||
watchdog.py |