diff --git a/pydbus/proxy_method.py b/pydbus/proxy_method.py index 8798edd..3e6e6ee 100644 --- a/pydbus/proxy_method.py +++ b/pydbus/proxy_method.py @@ -33,8 +33,8 @@ def __init__(self, iface_name, method): self.__name__ = method.attrib["name"] self.__qualname__ = self._iface_name + "." + self.__name__ - self._inargs = [(arg.attrib.get("name", ""), arg.attrib["type"]) for arg in method if arg.tag == "arg" and arg.attrib["direction"] == "in"] - self._outargs = [arg.attrib["type"] for arg in method if arg.tag == "arg" and arg.attrib["direction"] == "out"] + self._inargs = [(arg.attrib.get("name", ""), arg.attrib["type"]) for arg in method if arg.tag == "arg" and arg.attrib.get("direction", "in") == "in"] + self._outargs = [arg.attrib["type"] for arg in method if arg.tag == "arg" and arg.attrib.get("direction", "in") == "out"] self._sinargs = "(" + "".join(x[1] for x in self._inargs) + ")" self._soutargs = "(" + "".join(self._outargs) + ")"