mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Merge pull request #735 from vladimir-v-diaz/add_comment_for_socket_behavior
Explain via comment how to deal with socket exceptions. Address #728.
This commit is contained in:
commit
76ca2e8364
1 changed files with 4 additions and 1 deletions
|
|
@ -257,7 +257,10 @@ def _download_file(url, required_length, STRICT_REQUIRED_LENGTH=True):
|
|||
temp_file = securesystemslib.util.TempFile()
|
||||
|
||||
try:
|
||||
# Open the connection to the remote file.
|
||||
# Open the connection to the remote file. _open_connection() can raise
|
||||
# socket connection exceptions (such as SSLError). Connection errors of
|
||||
# this kind can be minimized by adjusting the socket timeout in
|
||||
# settings.py.
|
||||
connection = _open_connection(url)
|
||||
|
||||
# We ask the server about how big it thinks this file should be.
|
||||
|
|
|
|||
Loading…
Reference in a new issue