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:
parent
625bf74436
commit
fb1a7dccbf
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue