xref: /openbmc/openbmc-test-automation/lib/disable_warning_urllib.py (revision 1ae2a89116b3ddbaa90728cc2692054a884ca6e4)
1#!/usr/bin/env python3
2import logging
3import warnings
4
5try:
6    import httplib
7except ImportError:
8    import http.client
9
10warnings.filterwarnings("ignore")
11
12# Hijack the HTTP lib logger message and Log only once
13requests_log = logging.getLogger("requests.packages.urllib3")
14requests_log.setLevel(logging.CRITICAL)
15requests_log.propagate = False
16
17
18class disable_warning_urllib:
19    def do_nothing():
20        return
21