3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-01-22 19:44:14 +01:00

auto-t: hostapd: raise exception upon invalid config

If the config file passed in is not found we would continue and
eventually something else would fail. Instead immediately raise an
exception to be more clear on what is actually failing.
This commit is contained in:
James Prestwood 2019-10-22 09:14:00 -07:00 committed by Denis Kenzior
parent 6fea4e6f4f
commit cdc9eb13aa

View File

@ -37,6 +37,9 @@ class HostapdCLI:
interface = intf
break
if not interface:
raise Exception('config %s not found' % config)
self.ifname = interface.name
self.socket_path = os.path.dirname(interface.ctrl_interface)