From 8c2119b29589495fda1087cdccceda52935ee511 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 15 Mar 2022 15:55:06 -0700 Subject: [PATCH] Update Connection Failure Exception to ConnectionError --- adafruit_portalbase/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_portalbase/network.py b/adafruit_portalbase/network.py index 1a71c07..d35c50f 100644 --- a/adafruit_portalbase/network.py +++ b/adafruit_portalbase/network.py @@ -343,7 +343,7 @@ def connect(self, max_attempts=10): try: self._wifi.connect(self._secrets["ssid"], self._secrets["password"]) self.requests = self._wifi.requests - except RuntimeError as error: + except ConnectionError as error: if max_attempts is not None and attempt >= max_attempts: raise OSError( "Maximum number of attempts reached when trying to connect to WiFi"