Skip to content

Commit f790b71

Browse files
committed
Fix formatting errors
1 parent cf1ec95 commit f790b71

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

adafruit_portalbase/network.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,11 @@ def wget(self, url, filename, *, chunk_size=12000, headers=None):
333333

334334
if self._debug:
335335
print(response.headers)
336-
if "content-length" not in headers and "transfer-encoding" not in headers and headers["transfer-encoding"] != "chunked":
336+
if (
337+
"content-length" not in headers
338+
and "transfer-encoding" not in headers
339+
and headers["transfer-encoding"] != "chunked"
340+
):
337341
raise RuntimeError("Invalid headers in response")
338342

339343
print("Saving data to ", filename)
@@ -347,7 +351,9 @@ def wget(self, url, filename, *, chunk_size=12000, headers=None):
347351
remaining -= len(i)
348352
file.write(i)
349353
if self._debug:
350-
print("Read %d bytes, %d remaining" % (content_length - remaining, remaining))
354+
print(
355+
"Read %d bytes, %d remaining" % (content_length - remaining, remaining)
356+
)
351357
else:
352358
print(".", end="")
353359
if not remaining:

0 commit comments

Comments
 (0)