eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit ab51228b38e9fe5ebcbf6e7f0b3411c20b185e41
parent 4cc067e58e19805461c4da350268c37a9209c81b
Author: James Prestwood <prestwoj@gmail.com>
Date:   Thu, 17 Sep 2020 14:32:44 -0700

auto-t: allow IWDDBusAbstract to work with any service

This is somewhat of a hack, but the IWDDBusAbstract is a very
convenient abstraction to DBus objects. The only piece that restricts
it to IWD is the hardcoded IWD_SERVICE. Instead we can pass in a
keyword argument which defaults to IWD_SERVICE. That way other modules
(like EAD) can utilize this abstraction with their own service simply
by changing that service argument.

Diffstat:
Mautotests/util/iwd.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py @@ -120,9 +120,9 @@ class IWDDBusAbstract(AsyncOpAbstract): _bus = dbus.SystemBus() - def __init__(self, object_path = None, properties = None): + def __init__(self, object_path = None, properties = None, service=IWD_SERVICE): self._object_path = object_path - proxy = self._bus.get_object(IWD_SERVICE, self._object_path) + proxy = self._bus.get_object(service, self._object_path) self._iface = dbus.Interface(proxy, self._iface_name) self._prop_proxy = dbus.Interface(proxy, DBUS_PROPERTIES)