commit 5525f32cddac73f908f2b0ce7e7c769bd5f2b444
parent 6a1853b01a07d68fbddc8e6c4425c4d21a5fbe3a
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 17 Dec 2020 11:36:05 -0800
auto-t: update hwsim radio create to use dictionary
Diffstat:
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py
@@ -249,8 +249,15 @@ class RadioList(collections.Mapping):
def _interfaces_removed_handler(self, path, interfaces):
del _dict[path]
- def create(self, name='', p2p_device=False):
- path = self._radio_manager.CreateRadio(name, p2p_device)
+ def create(self, name=None, p2p_device=False):
+ args = dbus.Dictionary({
+ 'P2P': p2p_device,
+ }, signature='sv')
+
+ if name:
+ args['Name'] = name
+
+ path = self._radio_manager.CreateRadio(args)
obj = Radio(path)
self._dict[path] = obj
return obj