From 07136486978506dc3254210b3a8b375da633ca9c Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Wed, 30 May 2018 11:18:17 -0400 Subject: [PATCH] Explain via comment how to deal with function call that might raise socket exceptions Signed-off-by: Vladimir Diaz --- tuf/download.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tuf/download.py b/tuf/download.py index 9562f6ad..4449a44e 100755 --- a/tuf/download.py +++ b/tuf/download.py @@ -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.