Skip to content

Commit 5ea8aee

Browse files
committed
use forced content type
1 parent 0c1eb1c commit 5ea8aee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PyPortal_Discord/code.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import time
88
import board
99
from adafruit_pyportal import PyPortal
10+
from adafruit_portalbase.network import CONTENT_TEXT
1011

1112
# Set up where we'll be fetching data from
1213
DATA_SOURCE = "https://img.shields.io/discord/327254708534116352.svg"
@@ -22,7 +23,7 @@
2223

2324
while True:
2425
try:
25-
value = pyportal.fetch()
26+
value = pyportal.fetch(force_content_type=CONTENT_TEXT)
2627
print("Response is", value)
2728
except RuntimeError as e:
2829
print("Some error occured, retrying! -", e)

0 commit comments

Comments
 (0)