Merge "Disable InsecureRequestWarning"
This commit is contained in:
commit
e477a9f9df
@ -868,6 +868,9 @@ class Sync(object):
|
|||||||
self.log = logging.getLogger('gertty.sync')
|
self.log = logging.getLogger('gertty.sync')
|
||||||
self.queue = MultiQueue([HIGH_PRIORITY, NORMAL_PRIORITY, LOW_PRIORITY])
|
self.queue = MultiQueue([HIGH_PRIORITY, NORMAL_PRIORITY, LOW_PRIORITY])
|
||||||
self.result_queue = Queue.Queue()
|
self.result_queue = Queue.Queue()
|
||||||
|
# Disable InsecureRequestWarning when certificate validation is disabled
|
||||||
|
if not self.app.config.verify_ssl:
|
||||||
|
requests.packages.urllib3.disable_warnings()
|
||||||
self.session = requests.Session()
|
self.session = requests.Session()
|
||||||
if self.app.config.auth_type == 'basic':
|
if self.app.config.auth_type == 'basic':
|
||||||
authclass = requests.auth.HTTPBasicAuth
|
authclass = requests.auth.HTTPBasicAuth
|
||||||
|
Loading…
x
Reference in New Issue
Block a user