Skip to content

Commit

Permalink
celestica: reallocate the empty LIST at the constructor of subclasses (
Browse files Browse the repository at this point in the history
…#3738)

Signed-off-by: Dante Su <dante.su@broadcom.com>
  • Loading branch information
ds952811 authored and jleveque committed Nov 12, 2019
1 parent c07ae3b commit 473fc6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit 473fc6d

Please sign in to comment.