Skip to content

Commit fb9d8e7

Browse files
author
Jussi Kukkonen
committed
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 <[email protected]>
1 parent 26f4585 commit fb9d8e7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tuf/download.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,10 @@ def _download_file(url, required_length, STRICT_REQUIRED_LENGTH=True):
248248

249249
# Get the requests.Response object for this URL.
250250
#
251-
# Always stream to control how requests are downloaded:
252-
# http://docs.python-requests.org/en/master/user/advanced/#body-content-workflow
253-
#
251+
# Defer downloading the response body with stream=True.
254252
# Always set the timeout. This timeout value is interpreted by requests as:
255253
# - connect timeout (max delay before first byte is received)
256254
# - read (gap) timeout (max delay between bytes received)
257-
# These are NOT overall/total, wall-clock timeouts for any single read.
258-
# http://docs.python-requests.org/en/master/user/advanced/#timeouts
259255
with session.get(url, stream=True,
260256
timeout=tuf.settings.SOCKET_TIMEOUT) as response:
261257

0 commit comments

Comments
 (0)