Skip to content

Commit 679c707

Browse files
authored
Add files via upload
1 parent 62f85cb commit 679c707

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

pyarchivefile_py3.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,6 @@ def _wrap(stream):
338338
try:
339339
import requests
340340
haverequests = True
341-
logging.getLogger("httpx").setLevel(logging.WARNING)
342-
logging.getLogger("httpcore").setLevel(logging.WARNING)
343341
except Exception:
344342
pass
345343

@@ -392,6 +390,18 @@ def _wrap(stream):
392390
except Exception:
393391
pass
394392

393+
NOISY_LOGGERS = (
394+
"httpx",
395+
"httpcore",
396+
"h2",
397+
"hpack",
398+
"urllib3",
399+
"requests",
400+
)
401+
402+
for name in NOISY_LOGGERS:
403+
logging.getLogger(name).setLevel(logging.WARNING)
404+
logging.getLogger(name).disabled = True
395405

396406
ftpssl = True
397407
try:

0 commit comments

Comments
 (0)