mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Reduce logging in requests_fetcher
Remove repetitive debug logging. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
This commit is contained in:
parent
35fb22c13a
commit
9daccac7f8
1 changed files with 6 additions and 10 deletions
|
|
@ -124,12 +124,6 @@ def _chunks(self, response, required_length):
|
|||
# We might have no more data to read. Check number of bytes
|
||||
# downloaded.
|
||||
if not data:
|
||||
logger.debug(
|
||||
"Downloaded %d out of %d bytes",
|
||||
bytes_received,
|
||||
required_length,
|
||||
)
|
||||
|
||||
# Finally, we signal that the download is complete.
|
||||
break
|
||||
|
||||
|
|
@ -138,6 +132,12 @@ def _chunks(self, response, required_length):
|
|||
if bytes_received >= required_length:
|
||||
break
|
||||
|
||||
logger.debug(
|
||||
"Downloaded %d out of %d bytes",
|
||||
bytes_received,
|
||||
required_length,
|
||||
)
|
||||
|
||||
except urllib3.exceptions.ReadTimeoutError as e:
|
||||
raise exceptions.SlowRetrievalError(str(e))
|
||||
|
||||
|
|
@ -158,10 +158,6 @@ def _get_session(self, url):
|
|||
)
|
||||
|
||||
session_index = parsed_url.scheme + "+" + parsed_url.hostname
|
||||
|
||||
logger.debug("url: %s", url)
|
||||
logger.debug("session index: %s", session_index)
|
||||
|
||||
session = self._sessions.get(session_index)
|
||||
|
||||
if not session:
|
||||
|
|
|
|||
Loading…
Reference in a new issue