Skip to content

Commit ff792fe

Browse files
committed
make direction attribute conforming to introspect.dtd
direction attribute defaults to "in" as in the DTD(*1), direction attribute is defined as following: ``` <!ATTRLIST arg direction (in|out) "in"> ``` *1) http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd
1 parent f2e6355 commit ff792fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydbus/proxy_method.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def __init__(self, iface_name, method):
3333
self.__name__ = method.attrib["name"]
3434
self.__qualname__ = self._iface_name + "." + self.__name__
3535

36-
self._inargs = [(arg.attrib.get("name", ""), arg.attrib["type"]) for arg in method if arg.tag == "arg" and arg.attrib["direction"] == "in"]
37-
self._outargs = [arg.attrib["type"] for arg in method if arg.tag == "arg" and arg.attrib["direction"] == "out"]
36+
self._inargs = [(arg.attrib.get("name", ""), arg.attrib["type"]) for arg in method if arg.tag == "arg" and arg.attrib.get("direction", "in") == "in"]
37+
self._outargs = [arg.attrib["type"] for arg in method if arg.tag == "arg" and arg.attrib.get("direction", "in") == "out"]
3838
self._sinargs = "(" + "".join(x[1] for x in self._inargs) + ")"
3939
self._soutargs = "(" + "".join(self._outargs) + ")"
4040

0 commit comments

Comments
 (0)