1#!/usr/bin/env python3 2import logging 3import warnings 4try: 5 import httplib 6except ImportError: 7 import http.client 8 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 16 17class disable_warning_urllib(): 18 def do_nothing(): 19 return 20