3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-21 22:09:23 +01:00

test-runner: allow radio remove failure

This is somewhat of an open issue/TODO but for now this avoids
the exception caused by trying to remove a radio that has been
moved to a namespace. Once a radio is moved hwsim loses that phy
and can no longer interact with it. This causes the Destroy()
method call to fail.
This commit is contained in:
James Prestwood 2021-02-25 14:00:58 -08:00 committed by Denis Kenzior
parent 5e79cda7c6
commit bf9d2b6c52

View File

@ -395,7 +395,12 @@ class VirtualRadio(Radio):
def __del__(self):
super().__del__()
self._radio.remove()
# If the radio was moved into a namespace this will fail
try:
self._radio.remove()
except:
pass
self._radio = None
def __str__(self):