Skip to content

Commit 07fef5e

Browse files
author
brentru
committed
transfer encoding header value in exception instead
1 parent 8a87e1b commit 07fef5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def request(method, url, data=None, json=None, headers=None, stream=False, timeo
227227
resp.headers = parse_headers(sock)
228228
if resp.headers.get("transfer-encoding"):
229229
if "chunked" in resp.headers.get("transfer-encoding"):
230-
raise ValueError("Unsupported " + str(line[0]))
230+
raise ValueError("Unsupported " + resp.headers.get("transfer-encoding"))
231231
elif resp.headers.get("location") and not 200 <= status <= 299:
232232
raise NotImplementedError("Redirects not yet supported")
233233

0 commit comments

Comments
 (0)