Skip to content

Commit 19e47fd

Browse files
committed
Make the suggested change for handling valueerrors.
1 parent c961c09 commit 19e47fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_esp32spi/adafruit_esp32spi_wifimanager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def connect_normal(self):
144144
self.esp.connect_AP(bytes(ssid, "utf-8"), bytes(password, "utf-8"))
145145
failure_count = 0
146146
self.pixel_status((0, 100, 0))
147-
except (ValueError, OSError) as error:
147+
except OSError as error:
148148
print("Failed to connect, retrying\n", error)
149149
failure_count += 1
150150
if failure_count >= self.attempts:
@@ -173,7 +173,7 @@ def create_ap(self):
173173
self.esp.create_AP(bytes(self.ssid, "utf-8"), None)
174174
failure_count = 0
175175
self.pixel_status((0, 100, 0))
176-
except (ValueError, OSError) as error:
176+
except OSError as error:
177177
print("Failed to create access point\n", error)
178178
failure_count += 1
179179
if failure_count >= self.attempts:
@@ -203,7 +203,7 @@ def connect_enterprise(self):
203203
failure_count = 0
204204
self.pixel_status((0, 100, 0))
205205
sleep(1)
206-
except (ValueError, OSError) as error:
206+
except OSError as error:
207207
print("Failed to connect, retrying\n", error)
208208
failure_count += 1
209209
if failure_count >= self.attempts:

0 commit comments

Comments
 (0)