Disable InsecurePlatform Warnings

These warnings are filling up log files. Just disable them.

Change-Id: I906a03830a619e757842711e1044d8f65e24c2b5
This commit is contained in:
Ramy Asselin 2015-11-18 10:01:38 -08:00
parent 6200d9fe45
commit a02717a8c0
1 changed files with 12 additions and 0 deletions

View File

@ -25,6 +25,18 @@ from launchpadlib import launchpad
import pytz
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
from elastic_recheck import log as logging
import elastic_recheck.query_builder as qb