From fb1a7dccbf1a1d045515b8c8297328fb695998f3 Mon Sep 17 00:00:00 2001 From: Janusz Dziedzic Date: Thu, 7 Apr 2016 07:38:04 +0200 Subject: [PATCH] tests: Return hapd when add_bss() and add_iface() are used Return hapd from add_bss() and add_iface() while we can next use it. Signed-off-by: Janusz Dziedzic --- tests/hwsim/hostapd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index 6c6cba6a5..a6d4cad7c 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -412,6 +412,7 @@ def add_bss(apdev, ifname, confname, ignore_error=False): hapd = Hostapd(ifname, hostname=hostname, port=port) if not hapd.ping(): raise Exception("Could not ping hostapd") + return hapd def add_iface(apdev, confname): ifname = apdev['ifname'] @@ -429,6 +430,7 @@ def add_iface(apdev, confname): hapd = Hostapd(ifname, hostname=hostname, port=port) if not hapd.ping(): raise Exception("Could not ping hostapd") + return hapd def remove_bss(apdev, ifname=None): if ifname == None: