Skip to content

Commit 13ebf4d

Browse files
committed
fix httpserver imports. print errors if they occur
1 parent 527a999 commit 13ebf4d

File tree

1 file changed

+4
-2
lines changed
  • PicoW_CircuitPython_HTTP_Server

1 file changed

+4
-2
lines changed

PicoW_CircuitPython_HTTP_Server/code.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
import adafruit_displayio_ssd1306
1717
import adafruit_imageload
1818
from digitalio import DigitalInOut, Direction
19-
from adafruit_httpserver import HTTPServer, HTTPResponse
19+
from adafruit_httpserver.server import HTTPServer
20+
from adafruit_httpserver.response import HTTPResponse
2021
from adafruit_onewire.bus import OneWireBus
2122
from adafruit_ds18x20 import DS18X20
2223

@@ -249,5 +250,6 @@ def buttonpress(request):
249250
# poll the server for incoming/outgoing requests
250251
server.poll()
251252
# pylint: disable=broad-except
252-
except Exception:
253+
except Exception as e:
254+
print(e)
253255
continue

0 commit comments

Comments
 (0)