Disable InsecurePlatform Warnings
These warnings are filling up log files. Just disable them. Change-Id: I906a03830a619e757842711e1044d8f65e24c2b5
This commit is contained in:
parent
6200d9fe45
commit
a02717a8c0
@ -25,6 +25,18 @@ from launchpadlib import launchpad
|
|||||||
import pytz
|
import pytz
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Disable InsecurePlatformWarning warnings as documented here
|
||||||
|
# https://github.com/kennethreitz/requests/issues/2214
|
||||||
|
from requests.packages.urllib3.exceptions import InsecurePlatformWarning
|
||||||
|
requests.packages.urllib3.disable_warnings(InsecurePlatformWarning)
|
||||||
|
except ImportError:
|
||||||
|
# If there's an import error, then urllib3 may be packaged
|
||||||
|
# separately, so apply it there too
|
||||||
|
import urllib3
|
||||||
|
from urllib3.exceptions import InsecurePlatformWarning
|
||||||
|
urllib3.disable_warnings(InsecurePlatformWarning)
|
||||||
|
|
||||||
import elastic_recheck.elasticRecheck as er
|
import elastic_recheck.elasticRecheck as er
|
||||||
from elastic_recheck import log as logging
|
from elastic_recheck import log as logging
|
||||||
import elastic_recheck.query_builder as qb
|
import elastic_recheck.query_builder as qb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user