sonic-buildimage/device/celestica/x86_64-cel_e1031-r0/sonic_platform
Zhijian Li ab966ceeea
[E1031] Bugfix for Python syntax error in sonic_platform/common.py (#18386)
Why I did it
Bugfix for Python syntax error in sonic_platform/common.py.
A method of class need to have self as parameter.

Fixing below issue:

e1031:~$ show int st
Traceback (most recent call last):
  File "/usr/local/bin/intfutil", line 836, in <module>
    main()
  File "/usr/local/bin/intfutil", line 819, in main
    interface_stat.display_intf_status()
  File "/usr/local/bin/intfutil", line 448, in display_intf_status
    self.get_intf_status()
  File "/usr/local/lib/python3.9/dist-packages/utilities_common/multi_asic.py", line 157, in wrapped_run_on_all_asics
    func(self,  *args, **kwargs)
  File "/usr/local/bin/intfutil", line 529, in get_intf_status
    self.portchannel_speed_dict = po_speed_dict(self.po_int_dict, self.db)
  File "/usr/local/bin/intfutil", line 334, in po_speed_dict
    optics_type = port_optics_get(appl_db, value[0], PORT_OPTICS_TYPE)
  File "/usr/local/bin/intfutil", line 224, in port_optics_get
    if is_rj45_port(intf_name):
  File "/usr/local/lib/python3.9/dist-packages/utilities_common/platform_sfputil_helper.py", line 120, in is_rj45_port
    platform_chassis = sonic_platform.platform.Platform().get_chassis()
  File "/usr/local/lib/python3.9/dist-packages/sonic_platform/platform.py", line 21, in __init__
    self._chassis = Chassis()
  File "/usr/local/lib/python3.9/dist-packages/sonic_platform/chassis.py", line 37, in __init__
    self._is_host = self._api_common.is_host()
TypeError: is_host() takes 0 positional arguments but 1 was given
Work item tracking
Microsoft ADO (number only): 27208152
How I did it
Add self parameter to function Common::is_host().

How to verify it
Verified on E1031 DUT with this patch.
2024-03-19 14:04:38 +08:00
..
__init__.py [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-05-03 09:14:35 -07:00
chassis.py [device/celestica] Mitigation for command injection vulnerability (#11740) 2022-12-09 10:30:20 -05:00
common.py [E1031] Bugfix for Python syntax error in sonic_platform/common.py (#18386) 2024-03-19 14:04:38 +08:00
component.py [device/celestica] Mitigation for command injection vulnerability (#11740) 2022-12-09 10:30:20 -05:00
eeprom.py Fix issue of partially parsing syseeprom value (#10020) (#10276) 2022-03-21 09:25:36 -07:00
event.py [device/celestica]: Fix failed test cases of Haliburton platform API (#7579) 2021-07-23 06:18:39 -07:00
fan_drawer.py [Celestica/sonic_platform]: Fixed failed test cases in Haliburton platform testing (#8815) 2021-10-08 11:10:05 +08:00
fan.py [Celestica/sonic_platform]: Fixed failed test cases in Haliburton platform testing (#8815) 2021-10-08 11:10:05 +08:00
platform.py [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
psu.py [device/celestica]:Fix failed test case of Haliburton snmp (#10844) 2022-05-26 00:06:50 +08:00
sfp.py [hlx/sfp] fix hlx platform sfp+ tx disable issue (#11532) 2022-07-28 09:39:23 +08:00
thermal_actions.py [device/celestica] Mitigation for command injection vulnerability (#11740) 2022-12-09 10:30:20 -05:00
thermal_conditions.py [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-05-03 09:14:35 -07:00
thermal_infos.py [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-05-03 09:14:35 -07:00
thermal_manager.py [device/celestica] Mitigation for command injection vulnerability (#11740) 2022-12-09 10:30:20 -05:00
thermal.py [device/celestica]:Fix failed test case of Haliburton snmp (#10844) 2022-05-26 00:06:50 +08:00
watchdog.py [device/celestica]: Fix failed test cases of Haliburton platform API (#7579) 2021-07-23 06:18:39 -07:00