Skip to content

Commit

Permalink
using system level urllib3 if not preent in requests package
Browse files Browse the repository at this point in the history
Some requests packages have their own urllib3 package bundled but some others
don't. Need to take care of both the cases
Closes-Bug: #1689675
Closes-Bug: #1691603
Change-Id: Ia88e5e110544e8f4c2a3ac2dc5b72ed0fa0d087b
(cherry picked from commit b866f79)
  • Loading branch information
bansalnikhil committed May 18, 2017
1 parent 16cd823 commit 22ecd10
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/config/utils/contrail-status.py
Expand Up @@ -11,12 +11,19 @@
import ConfigParser
import socket
import requests
from requests.packages.urllib3.exceptions import SubjectAltNameWarning
try:
from requests.packages.urllib3.exceptions import SubjectAltNameWarning
warnings.filterwarnings('ignore', category=SubjectAltNameWarning)
except:
try:
from urllib3.exceptions import SubjectAltNameWarning
warnings.filterwarnings('ignore', category=SubjectAltNameWarning)
except:
pass
import warnings
warnings.filterwarnings('ignore', ".*SNIMissingWarning.*")
warnings.filterwarnings('ignore', ".*InsecurePlatformWarning.*")
warnings.filterwarnings('ignore', ".*SubjectAltNameWarning.*")
warnings.filterwarnings('ignore', category=SubjectAltNameWarning)
from StringIO import StringIO
from lxml import etree
from sandesh_common.vns.constants import ServiceHttpPortMap, \
Expand Down

0 comments on commit 22ecd10

Please sign in to comment.