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

celestica: reallocate the empty LIST at the constructor of subclasses #3738

Merged
merged 1 commit into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Chassis(ChassisBase):
"""Platform-specific Chassis class"""

def __init__(self):
ChassisBase.__init__(self)
self.config_data = {}
for fant_index in range(0, NUM_FAN_TRAY):
for fan_index in range(0, NUM_FAN):
Expand All @@ -59,7 +60,6 @@ def __init__(self):
for index in range(0, NUM_COMPONENT):
component = Component(index)
self._component_list.append(component)
ChassisBase.__init__(self)
self._reboot_cause_path = HOST_REBOOT_CAUSE_PATH if self.__is_host(
) else PMON_REBOOT_CAUSE_PATH

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class Chassis(ChassisBase):
"""Platform-specific Chassis class"""

def __init__(self):
ChassisBase.__init__(self)
self.config_data = {}
for fant_index in range(0, NUM_FAN_TRAY):
for fan_index in range(0, NUM_FAN):
Expand All @@ -61,7 +62,6 @@ def __init__(self):
for index in range(0, NUM_COMPONENT):
component = Component(index)
self._component_list.append(component)
ChassisBase.__init__(self)

self._watchdog = Watchdog()
self._eeprom = Tlv()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Psu(PsuBase):
"""Platform-specific Psu class"""

def __init__(self, psu_index):
PsuBase.__init__(self)
self.index = psu_index
self.green_led_path = GREEN_LED_PATH.format(self.index+1)
self.dx010_psu_gpio = [
Expand All @@ -52,7 +53,6 @@ def __init__(self, psu_index):
for fan_index in range(0, PSU_NUM_FAN[self.index]):
fan = Fan(fan_index, 0, is_psu_fan=True, psu_index=self.index)
self._fan_list.append(fan)
PsuBase.__init__(self)

def __read_txt_file(self, file_path):
try:
Expand Down