Always use stream=True when iterating over a request
Fixes https://pagure.io/releng/issue/9226
This commit is contained in:
parent
5ad52611c1
commit
388bb070f1
2 changed files with 2 additions and 2 deletions
|
|
@ -1677,7 +1677,7 @@ def openRemoteFile(relpath, topurl=None, topdir=None, tempdir=None):
|
|||
url = "%s/%s" % (topurl, relpath)
|
||||
fo = tempfile.TemporaryFile(dir=tempdir)
|
||||
try:
|
||||
resp = requests.get(url)
|
||||
resp = requests.get(url, stream=True)
|
||||
for chunk in resp.iter_content(chunk_size=8192):
|
||||
fo.write(chunk)
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue