auto-t: hostapd: raise exception upon invalid config
PATCH 1/1 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.
--- autotests/util/hostapd.py | 3 +++ 1 file changed, 3 insertions(+)
autotests/util/hostapd.py +3 -0
@@ -45,6 +45,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)
Signature · 1 line
2.17.1
Denis Kenzior
AppliedHi James,
Quoted 7 lines · James Prestwood
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.
--- autotests/util/hostapd.py | 3 +++ 1 file changed, 3 insertions(+)
Applied, thanks.
Regards,
-Denis