Use super to construct dbus.service.Object
Change-Id: I830decfc523d435c6b9ecdc9ffffec7956c3b85d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/pychassisctl/chassis_control.py b/pychassisctl/chassis_control.py
index 20532c9..1e57936 100644
--- a/pychassisctl/chassis_control.py
+++ b/pychassisctl/chassis_control.py
@@ -34,10 +34,9 @@
return uuid
def __init__(self, bus, name):
- self.dbus_objects = {}
- DbusProperties.__init__(self)
- DbusObjectManager.__init__(self)
- dbus.service.Object.__init__(self, bus, name)
+ super(ChassisControlObject, self).__init__(
+ conn=bus,
+ object_path=name)
## load utilized objects
self.dbus_objects = {
'power_control': {
diff --git a/pyfanctl/fan_control.py b/pyfanctl/fan_control.py
index 85163e8..2bfdd80 100644
--- a/pyfanctl/fan_control.py
+++ b/pyfanctl/fan_control.py
@@ -24,9 +24,9 @@
class FanControl(DbusProperties, DbusObjectManager):
def __init__(self, bus, name):
- DbusProperties.__init__(self)
- DbusObjectManager.__init__(self)
- dbus.service.Object.__init__(self, bus, name)
+ super(FanControl, self).__init__(
+ conn=bus,
+ object_path=name)
self.Set(IFACE_NAME, "floor", 250)
self.Set(IFACE_NAME, "ceiling", 255)
self.fan_intf = []
diff --git a/pyflashbmc/bmc_update.py b/pyflashbmc/bmc_update.py
index e761fff..94c36d6 100644
--- a/pyflashbmc/bmc_update.py
+++ b/pyflashbmc/bmc_update.py
@@ -29,10 +29,9 @@
class BmcFlashControl(DbusProperties, DbusObjectManager):
def __init__(self, bus, name):
- self.dbus_objects = {}
- DbusProperties.__init__(self)
- DbusObjectManager.__init__(self)
- dbus.service.Object.__init__(self, bus, name)
+ super(BmcFlashControl, self).__init__(
+ conn=bus,
+ object_path=name)
self.Set(DBUS_NAME, "status", "Idle")
self.Set(DBUS_NAME, "filename", "")
diff --git a/pyinventorymgr/inventory_items.py b/pyinventorymgr/inventory_items.py
index 456c2f3..16ae6d0 100644
--- a/pyinventorymgr/inventory_items.py
+++ b/pyinventorymgr/inventory_items.py
@@ -26,15 +26,16 @@
class Inventory(DbusProperties, DbusObjectManager):
def __init__(self, bus, name):
- DbusProperties.__init__(self)
- DbusObjectManager.__init__(self)
- dbus.service.Object.__init__(self, bus, name)
+ super(Inventory, self).__init__(
+ conn=bus,
+ object_path=name)
class InventoryItem(DbusProperties):
def __init__(self, bus, name, data):
- DbusProperties.__init__(self)
- dbus.service.Object.__init__(self, bus, name)
+ super(InventoryItem, self).__init__(
+ conn=bus,
+ object_path=name)
self.name = name
diff --git a/pysensormgr/sensor_manager2.py b/pysensormgr/sensor_manager2.py
index 9a4bc08..4095618 100644
--- a/pysensormgr/sensor_manager2.py
+++ b/pysensormgr/sensor_manager2.py
@@ -19,9 +19,9 @@
class SensorManager(DbusProperties, DbusObjectManager):
def __init__(self, bus, name):
- DbusProperties.__init__(self)
- DbusObjectManager.__init__(self)
- dbus.service.Object.__init__(self, bus, name)
+ super(SensorManager, self).__init__(
+ conn=bus,
+ object_path=name)
@dbus.service.method(
DBUS_NAME, in_signature='ss', out_signature='')
diff --git a/pysystemmgr/system_manager.py b/pysystemmgr/system_manager.py
index fe786e5..716c85d 100644
--- a/pysystemmgr/system_manager.py
+++ b/pysystemmgr/system_manager.py
@@ -19,9 +19,9 @@
class SystemManager(DbusProperties, DbusObjectManager):
def __init__(self, bus, obj_name):
- DbusProperties.__init__(self)
- DbusObjectManager.__init__(self)
- dbus.service.Object.__init__(self, bus, obj_name)
+ super(SystemManager, self).__init__(
+ conn=bus,
+ object_path=obj_name)
self.bus = bus
bus.add_signal_receiver(