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