Skip to content

Commit af6fbd6

Browse files
committed
Reduce logging in requests_fetcher
Remove repetitive debug logging. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
1 parent f0b051f commit af6fbd6

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

tuf/ngclient/_internal/requests_fetcher.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,6 @@ def _chunks(response, required_length):
121121
# We might have no more data to read. Check number of bytes
122122
# downloaded.
123123
if not data:
124-
logger.debug(
125-
"Downloaded %d out of %d bytes",
126-
bytes_received,
127-
required_length,
128-
)
129-
130124
# Finally, we signal that the download is complete.
131125
break
132126

@@ -135,6 +129,12 @@ def _chunks(response, required_length):
135129
if bytes_received >= required_length:
136130
break
137131

132+
logger.debug(
133+
"Downloaded %d out of %d bytes",
134+
bytes_received,
135+
required_length,
136+
)
137+
138138
except urllib3.exceptions.ReadTimeoutError as e:
139139
raise exceptions.SlowRetrievalError(str(e))
140140

@@ -155,10 +155,6 @@ def _get_session(self, url):
155155
)
156156

157157
session_index = parsed_url.scheme + "+" + parsed_url.hostname
158-
159-
logger.debug("url: %s", url)
160-
logger.debug("session index: %s", session_index)
161-
162158
session = self._sessions.get(session_index)
163159

164160
if not session:

0 commit comments

Comments
 (0)