From 36bc4e15c30c3cd3f5ec950c5b31cc47cb6c1318 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 29 Jul 2021 15:21:47 -0700 Subject: [PATCH] auto-t: hostapd: catch local socket remove exception This happens if hostapd is killed ungracefully which is done in some tests. --- autotests/util/hostapd.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py index 4e694c84..6031b1dc 100644 --- a/autotests/util/hostapd.py +++ b/autotests/util/hostapd.py @@ -118,7 +118,11 @@ class HostapdCLI: return self.ctrl_sock.close() - os.remove(self.local_ctrl) + + try: + os.remove(self.local_ctrl) + except: + pass if self._hostapd_restarted: ctx.stop_process(ctx.hostapd.process, force)