Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get_radio_ssl_context #158

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/esp32spi/requests_esp32spi_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os

import adafruit_connection_manager
import adafruit_esp32spi.adafruit_esp32spi_socket as pool
import board
import busio
from adafruit_esp32spi import adafruit_esp32spi
Expand Down Expand Up @@ -44,7 +43,8 @@
print("Connected to", str(radio.ssid, "utf-8"), "\tRSSI:", radio.rssi)

# Initialize a requests session
ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio)
pool = adafruit_connection_manager.get_radio_socketpool(radio)
ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio)
requests = adafruit_requests.Session(pool, ssl_context)

JSON_GET_URL = "https://httpbin.org/get"
Expand Down
4 changes: 2 additions & 2 deletions examples/esp32spi/requests_esp32spi_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os

import adafruit_connection_manager
import adafruit_esp32spi.adafruit_esp32spi_socket as pool
import board
import busio
from adafruit_esp32spi import adafruit_esp32spi
Expand Down Expand Up @@ -44,7 +43,8 @@
print("Connected to", str(radio.ssid, "utf-8"), "\tRSSI:", radio.rssi)

# Initialize a requests session
ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio)
pool = adafruit_connection_manager.get_radio_socketpool(radio)
ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio)
requests = adafruit_requests.Session(pool, ssl_context)

TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
Expand Down
4 changes: 2 additions & 2 deletions examples/wiznet5k/requests_wiznet5k_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# SPDX-License-Identifier: MIT

import adafruit_connection_manager
import adafruit_wiznet5k.adafruit_wiznet5k_socket as pool
import board
import busio
from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K
Expand All @@ -17,7 +16,8 @@
radio = WIZNET5K(spi_bus, cs)

# Initialize a requests session
ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio)
pool = adafruit_connection_manager.get_radio_socketpool(radio)
ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio)
requests = adafruit_requests.Session(pool, ssl_context)

JSON_GET_URL = "http://httpbin.org/get"
Expand Down
4 changes: 2 additions & 2 deletions examples/wiznet5k/requests_wiznet5k_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# SPDX-License-Identifier: MIT

import adafruit_connection_manager
import adafruit_wiznet5k.adafruit_wiznet5k_socket as pool
import board
import busio
from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K
Expand All @@ -17,7 +16,8 @@
radio = WIZNET5K(spi_bus, cs)

# Initialize a requests session
ssl_context = adafruit_connection_manager.create_fake_ssl_context(pool, radio)
pool = adafruit_connection_manager.get_radio_socketpool(radio)
ssl_context = adafruit_connection_manager.get_radio_ssl_context(radio)
requests = adafruit_requests.Session(pool, ssl_context)

TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
Expand Down
Loading