in pystemd/base.py [0:0]
def _call_method(self, method_name, *args):
# If the method exist in the sd_object, and it has been authorized to
# overwrite the method in this interface, call that one
overwrite_method = getattr(self.sd_object, method_name, None)
overwrite_interfaces = getattr(overwrite_method, "overwrite_interfaces", [])
if callable(overwrite_method) and self.interface_name in overwrite_interfaces:
return overwrite_method(self.interface_name, *args)
# There is no overwrite in the sd_object, we should call original method
# we should call the default method (good enough fpor most cases)
meth = self._methods_xml[method_name]
in_args = [
arg.attrib.get("type")
for arg in meth.getchildren()
if etree.iselement(arg) and arg.attrib.get("direction") == "in"
]
return self._auto_call_dbus_method(method_name, in_args, *args)