meta-openembedded/meta-python/recipes-devtools/python/python3-pydbus/0001-make-direction-attribute-conforming-to-introspect.dt.patch
Derek Straka 3c188f75ea python3-dbus: re-add recipe with latest patches and add ptest
The python3-dbus package was removed in (dac933e).  While the upstream
project isn't active, other distributions (e.g. Fedora, Debian, etc)
continue to offer the package and apply patches to resolve reported issues.

While other packages offer similar functionality (e.g. dasbus), they are not
drop in replacements and the general dbus functionality works out of the box.
The python package has accomplished it's goal of providing useful functionality,
and the proposal is to continue to have it available in meta-python for use.

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-03-22 21:19:50 -07:00

41 lines
1.7 KiB
Diff

From 5fe65a35e0e7106347639f0258206fadb451c439 Mon Sep 17 00:00:00 2001
From: Hiroaki KAWAI <hiroaki.kawai@gmail.com>
Date: Wed, 1 Feb 2017 18:00:33 +0900
Subject: [PATCH 1/3] 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
Adapted from Fedora [https://src.fedoraproject.org/cgit/rpms/python-pydbus.git/]
Upstream-Status: Inactive-Upstream (Last release 12/18/2016; Last commit 05/6/2018)
Signed-off-by: Derek Straka <derek@asterius.io>
---
pydbus/proxy_method.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 @@ class ProxyMethod(object):
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) + ")"
--
2.13.5