sta_connect: sta_connect.setup needs to not throw an error if the port does not exist.

It needs to quietly remove the old station and move on.

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-12-16 12:01:01 -08:00
parent 6f86f2aa05
commit d796415dd4

View File

@@ -174,13 +174,8 @@ class StaConnect(Realm):
return False
for sta_name in self.station_names:
sta_url = self.get_station_url(sta_name)
response = self.json_get(sta_url)
if response:
if response["interface"]:
print("removing old station")
if self.port_exists(sta_name):
self.rm_port(sta_name)
if self.port_exists(sta_name, debug=False):
self.rm_port(sta_name, debug_=False)
self.wait_until_ports_disappear(self.station_names)
# Create stations and turn dhcp on