Add RuntimeError to except block
This commit is contained in:
parent
bf326aaec2
commit
7166e56390
1 changed files with 1 additions and 1 deletions
|
|
@ -364,7 +364,7 @@ class NetworkBase:
|
||||||
self._wifi.connect(secret_entry["ssid"], secret_entry["password"])
|
self._wifi.connect(secret_entry["ssid"], secret_entry["password"])
|
||||||
self.requests = self._wifi.requests
|
self.requests = self._wifi.requests
|
||||||
break
|
break
|
||||||
except ConnectionError as error:
|
except (RuntimeError, ConnectionError) as error:
|
||||||
if max_attempts is not None and attempt >= max_attempts:
|
if max_attempts is not None and attempt >= max_attempts:
|
||||||
break
|
break
|
||||||
print("Could not connect to internet", error)
|
print("Could not connect to internet", error)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue