mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
write requests response content more idomatically
This commit is contained in:
+1
-2
@@ -944,6 +944,5 @@ def download_file(url, filename):
|
||||
if not r.ok:
|
||||
raise IOError('Unable to download file')
|
||||
|
||||
r.raw.decode_content = True
|
||||
with open(filename, 'wb') as f:
|
||||
shutil.copyfileobj(r.raw, f)
|
||||
f.write(r.content)
|
||||
|
||||
Reference in New Issue
Block a user