Skip to content

Commit

Permalink
switch read to recv
Browse files Browse the repository at this point in the history
  • Loading branch information
brentru committed Aug 29, 2019
1 parent 56d7643 commit 341a880
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def content(self):
# print("Content length:", content_length)
if self._cached is None:
try:
self._cached = self.socket.read(content_length)
self._cached = self.socket.recv(content_length)
finally:
self.socket.close()
self.socket = None
Expand Down Expand Up @@ -138,7 +138,7 @@ def iter_content(self, chunk_size=1, decode_unicode=False):
raise NotImplementedError("Unicode not supported")

while True:
chunk = self.socket.read(chunk_size)
chunk = self.socket.recv(chunk_size)
if chunk:
yield chunk
else:
Expand Down

0 comments on commit 341a880

Please sign in to comment.