Add RuntimeError to except block

This commit is contained in:
Alec Delaney 2022-04-18 18:47:05 -04:00
parent bf326aaec2
commit 7166e56390

View file

@ -364,7 +364,7 @@ class NetworkBase:
self._wifi.connect(secret_entry["ssid"], secret_entry["password"])
self.requests = self._wifi.requests
break
except ConnectionError as error:
except (RuntimeError, ConnectionError) as error:
if max_attempts is not None and attempt >= max_attempts:
break
print("Could not connect to internet", error)