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
1 changed files with 6 additions and 1 deletions

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):