Skip to content

Commit 16b418b

Browse files
author
Kevin Kirsche
authored
Use yield from instead of looping yield (#6170)
1 parent 0e28c8f commit 16b418b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

requests/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,8 +813,7 @@ def generate():
813813
# Special case for urllib3.
814814
if hasattr(self.raw, "stream"):
815815
try:
816-
for chunk in self.raw.stream(chunk_size, decode_content=True):
817-
yield chunk
816+
yield from self.raw.stream(chunk_size, decode_content=True)
818817
except ProtocolError as e:
819818
raise ChunkedEncodingError(e)
820819
except DecodeError as e:

0 commit comments

Comments
 (0)