Handle SNIMissingWarning requests exception
Change-Id: I7e0bae3732d3cb22cbc9d3041a625635f7d61c4f
This commit is contained in:
parent
6f68c58224
commit
e41ef69663
@ -725,6 +725,8 @@ class App(object):
|
|||||||
# nearly un-actionable.
|
# nearly un-actionable.
|
||||||
if category == requestsexceptions.InsecurePlatformWarning:
|
if category == requestsexceptions.InsecurePlatformWarning:
|
||||||
return
|
return
|
||||||
|
if category == requestsexceptions.SNIMissingWarning:
|
||||||
|
return
|
||||||
# Disable InsecureRequestWarning when certificate validation is disabled
|
# Disable InsecureRequestWarning when certificate validation is disabled
|
||||||
if not self.config.verify_ssl:
|
if not self.config.verify_ssl:
|
||||||
if category == requestsexceptions.InsecureRequestWarning:
|
if category == requestsexceptions.InsecureRequestWarning:
|
||||||
|
@ -27,3 +27,11 @@ except ImportError:
|
|||||||
from urllib3.exceptions import InsecureRequestWarning
|
from urllib3.exceptions import InsecureRequestWarning
|
||||||
except ImportError:
|
except ImportError:
|
||||||
InsecureRequestWarning = None
|
InsecureRequestWarning = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
from requests.packages.urllib3.exceptions import SNIMissingWarning
|
||||||
|
except ImportError:
|
||||||
|
try:
|
||||||
|
from urllib3.exceptions import SNIMissingWarning
|
||||||
|
except ImportError:
|
||||||
|
SNIMissingWarning = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user