Skip to content

Commit 6bf4973

Browse files
committed
The value errors caught in these wouldn't be recoverable, but the OS errors may be.
1 parent df4112a commit 6bf4973

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/esp32spi_aio_post.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
response.close()
6767
counter = counter + 1
6868
print("OK")
69-
except (ValueError, OSError) as e:
69+
except OSError as e:
7070
print("Failed to get data, retrying\n", e)
7171
wifi.reset()
7272
continue

examples/esp32spi_cheerlights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
value = value[key]
5555
print(value)
5656
response.close()
57-
except (ValueError, OSError) as e:
57+
except OSError as e:
5858
print("Failed to get data, retrying\n", e)
5959
wifi.reset()
6060
continue

examples/esp32spi_localtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
print("Fetching json from", TIME_API)
4343
response = wifi.get(TIME_API)
4444
break
45-
except (ValueError, OSError) as e:
45+
except OSError as e:
4646
print("Failed to get data, retrying\n", e)
4747
continue
4848

examples/esp32spi_wpa2ent_aio_post.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
response.close()
6464
counter = counter + 1
6565
print("OK")
66-
except (ValueError, OSError) as e:
66+
except OSError as e:
6767
print("Failed to get data, retrying\n", e)
6868
wifi.reset()
6969
continue

examples/server/esp32spi_wsgiserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def led_color(environ): # pylint: disable=unused-argument
240240
try:
241241
wsgiServer.update_poll()
242242
# Could do any other background tasks here, like reading sensors
243-
except (ValueError, OSError) as e:
243+
except OSError as e:
244244
print("Failed to update server, restarting ESP32\n", e)
245245
wifi.reset()
246246
continue

0 commit comments

Comments
 (0)