Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util/agents/network_interface: handle wifis without SSID
Hidden wifis do not send an SSID. If a hidden wifi is in reach, the following error can be observed: Traceback (most recent call last): File "/path/to/labgrid/examples/networkmanager/nm.py", line 68, in <module> pprint(d.get_access_points()) ^^^^^^^^^^^^^^^^^^^^^ File "/path/to/labgrid/labgrid/binding.py", line 102, in wrapper return func(self, *_args, **_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/path/to/labgrid/labgrid/step.py", line 215, in wrapper _result = func(*_args, **_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ File "/path/to/labgrid/labgrid/driver/networkinterfacedriver.py", line 126, in get_access_points return self.proxy.get_access_points(self.iface.ifname, scan) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/path/to/labgrid/labgrid/util/agentwrapper.py", line 29, in __call__ return self.wrapper.call(self.name, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/path/to/labgrid/labgrid/util/agentwrapper.py", line 106, in call raise AgentException(e) labgrid.util.agentwrapper.AgentException: AttributeError("'NoneType' object has no attribute 'get_data'") Fix that by retrieving the SSID only if it was received. The AP dict will not contain the "ssid" key if no SSID was received. Signed-off-by: Bastian Krause <[email protected]>
- Loading branch information