mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Download: Fix documentation
* Remove dead urls: trust reader to find Requests documentation on their own * Mention that "stream" means that downloading the body is deferred Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
This commit is contained in:
parent
26f45858d7
commit
fb9d8e7d64
1 changed files with 1 additions and 5 deletions
|
|
@ -248,14 +248,10 @@ def _download_file(url, required_length, STRICT_REQUIRED_LENGTH=True):
|
|||
|
||||
# Get the requests.Response object for this URL.
|
||||
#
|
||||
# Always stream to control how requests are downloaded:
|
||||
# http://docs.python-requests.org/en/master/user/advanced/#body-content-workflow
|
||||
#
|
||||
# Defer downloading the response body with stream=True.
|
||||
# Always set the timeout. This timeout value is interpreted by requests as:
|
||||
# - connect timeout (max delay before first byte is received)
|
||||
# - read (gap) timeout (max delay between bytes received)
|
||||
# These are NOT overall/total, wall-clock timeouts for any single read.
|
||||
# http://docs.python-requests.org/en/master/user/advanced/#timeouts
|
||||
with session.get(url, stream=True,
|
||||
timeout=tuf.settings.SOCKET_TIMEOUT) as response:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue