diff --git a/src/pkgcheck/addons/net.py b/src/pkgcheck/addons/net.py index 6db5432d2..782d74d1d 100644 --- a/src/pkgcheck/addons/net.py +++ b/src/pkgcheck/addons/net.py @@ -2,12 +2,14 @@ import logging import os - -import requests +import warnings from ..checks.network import RequestError, SSLError -# suppress all urllib3 log messages +# suppress all urllib3 log messages and import warnings +with warnings.catch_warnings(): + warnings.simplefilter("ignore") + import requests logging.getLogger("urllib3").propagate = False