From 5a587c2a0d9eff5965d2eed5b5c4b6607a6e3c66 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Fri, 26 Mar 2021 16:59:32 -0500 Subject: [PATCH 1/2] fix .server_state()attribute name ``` ... socket.set_interface(esp) ss = socket.socket() esp.start_server(PORT, ss.socknum) print("Server status: ", esp.server_state(ss.socknum)) print("Server status: ", esp.get_server_state(ss.socknum)) ``` yields ``` Server status: 1 Traceback (most recent call last): File "code.py", line 76, in AttributeError: 'ESP_SPIcontrol' object has no attribute 'get_server_state' ``` --- adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py b/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py index c869575..2952da0 100644 --- a/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py +++ b/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py @@ -75,7 +75,7 @@ def start(self): print("Server available at {0}:{1}".format(ip, self.port)) print( "Sever status: ", - _the_interface.get_server_state(self._server_sock.socknum), + _the_interface.server_state(self._server_sock.socknum), ) def update_poll(self): From 502975826b07012dbe4e46853c3a97ecc85e8169 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Sat, 27 Mar 2021 11:08:14 -0500 Subject: [PATCH 2/2] Update adafruit_esp32spi_wsgiserver.py --- adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py b/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py index 2952da0..ff89a73 100644 --- a/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py +++ b/adafruit_esp32spi/adafruit_esp32spi_wsgiserver.py @@ -74,7 +74,7 @@ def start(self): ip = _the_interface.pretty_ip(_the_interface.ip_address) print("Server available at {0}:{1}".format(ip, self.port)) print( - "Sever status: ", + "Server status: ", _the_interface.server_state(self._server_sock.socknum), )