[Mellanox] Ensure concrete platform API classes call base class initializer (#6854)
In preparation for the merging of Azure/sonic-platform-common#173, which properly defines class and instance members in the Platform API base classes. It is proper object-oriented methodology to call the base class initializer, even if it is only the default initializer. This also future-proofs the potential addition of custom initializers in the base classes down the road.
This commit is contained in:
parent
66e3e51f70
commit
516ff8bfff
@ -323,6 +323,7 @@ class ONIEUpdater(object):
|
||||
|
||||
class Component(ComponentBase):
|
||||
def __init__(self):
|
||||
super(Component, self).__init__()
|
||||
self.name = None
|
||||
self.description = None
|
||||
self.image_ext_name = None
|
||||
|
@ -393,6 +393,7 @@ class Thermal(ThermalBase):
|
||||
"""
|
||||
index should be a string for category ambient and int for other categories
|
||||
"""
|
||||
super(Thermal, self).__init__()
|
||||
if category == THERMAL_DEV_CATEGORY_AMBIENT:
|
||||
self.name = thermal_ambient_name[index]
|
||||
self.index = index
|
||||
|
@ -63,6 +63,7 @@ class WatchdogImplBase(WatchdogBase):
|
||||
Open a watchdog handle
|
||||
@param wd_device_path Path to watchdog device
|
||||
"""
|
||||
super(WatchdogImplBase, self).__init__()
|
||||
|
||||
self.watchdog_path = wd_device_path
|
||||
self.watchdog = os.open(self.watchdog_path, os.O_WRONLY)
|
||||
|
Loading…
Reference in New Issue
Block a user