test-runner: fix exception in Hostapd __del__

If Hostapd did not start there was no CLI instance created and
that member should be be accessed.
This commit is contained in:
James Prestwood 2021-08-17 09:45:01 -07:00 committed by Denis Kenzior
parent f0a890da8a
commit 81cf11b0f5
1 changed files with 3 additions and 0 deletions

View File

@ -546,6 +546,9 @@ class Hostapd:
print("Failed to remove %s" % self.global_ctrl_iface)
for hapd in self.instances:
if not hapd.cli:
continue
hapd.cli._instances[hapd.config] = None
hapd.cli = None