Disable InsecureRequestWarning if SSL verify is False
If checking of HTTPS validity is disable, turn off the warning that it has been disabled since we have done so explicitly.
This commit is contained in:
@ -59,6 +59,10 @@ sess.verify = False # '/path/to/certfile'
|
|||||||
# If verify is set to a path to a directory,
|
# If verify is set to a path to a directory,
|
||||||
# the directory must have been processed using the c_rehash utility supplied
|
# the directory must have been processed using the c_rehash utility supplied
|
||||||
# with OpenSSL.
|
# with OpenSSL.
|
||||||
|
if sess.verify is False:
|
||||||
|
# Disable the warning that the request is insecure, we know that...
|
||||||
|
import urllib3
|
||||||
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||||
|
|
||||||
SELECTOR = ['stream', 'allStreams']
|
SELECTOR = ['stream', 'allStreams']
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user