blob: 55a7239d5e904d4313bbf1255df2cf95028cd094 [file] [log] [blame]
Chris Austenb29d2e82016-06-07 12:25:35 -05001#!/usr/bin/python
2import logging
3import warnings
George Keishing3b7115a2018-08-02 10:48:17 -05004try:
5 import httplib
6except ImportError:
7 import http.client
Chris Austenb29d2e82016-06-07 12:25:35 -05008
9warnings.filterwarnings("ignore")
10
11# Hijack the HTTP lib logger message and Log only once
12requests_log = logging.getLogger("requests.packages.urllib3")
13requests_log.setLevel(logging.CRITICAL)
14requests_log.propagate = False
15
Gunnar Mills096cd562018-03-26 10:19:12 -050016
Chris Austenb29d2e82016-06-07 12:25:35 -050017class disable_warning_urllib():
18 def do_nothing():
19 return