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 | |
Gunnar Mills | 096cd56 | 2018-03-26 10:19:12 -0500 | [diff] [blame] | 13 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 14 | class disable_warning_urllib(): |
| 15 | def do_nothing(): |
| 16 | return |