sta_connect.py: Don't spout an error if trying to remove a station which doesn't exist

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-12-14 16:18:05 -08:00
parent 330eeabf8f
commit 638894a277

View File

@@ -182,7 +182,8 @@ class StaConnect(Realm):
if response is not None:
if response["interface"] is not None:
print("removing old station")
self.rm_port(sta_name)
if self.port_exists(sta_name):
self.rm_port(sta_name)
self.wait_until_ports_disappear(self.station_names)
# Create stations and turn dhcp on