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 <janusz.dziedzic@tieto.com>
This commit is contained in:
Janusz Dziedzic 2016-04-07 07:38:04 +02:00 committed by Jouni Malinen
parent 625bf74436
commit fb1a7dccbf

View file

@ -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: