Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | #!/usr/bin/python |
2 | import logging | ||||
3 | import warnings | ||||
4 | import httplib | ||||
5 | |||||
6 | warnings.filterwarnings("ignore") | ||||
7 | |||||
8 | # Hijack the HTTP lib logger message and Log only once | ||||
9 | requests_log = logging.getLogger("requests.packages.urllib3") | ||||
10 | requests_log.setLevel(logging.CRITICAL) | ||||
11 | requests_log.propagate = False | ||||
12 | |||||
13 | class disable_warning_urllib(): | ||||
14 | def do_nothing(): | ||||
15 | return | ||||
16 |