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.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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue