From bf9d2b6c52c31700d32767d1f35d73c8686cff77 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 25 Feb 2021 14:00:58 -0800 Subject: [PATCH] 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. --- tools/test-runner | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/test-runner b/tools/test-runner index 2fb7a613..62c4bd75 100755 --- a/tools/test-runner +++ b/tools/test-runner @@ -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):