Disable SSL verification for SaaS as a temporary workaround

This commit is contained in:
Albert Santoni 2014-11-11 12:18:20 -05:00
parent 5f27e3099a
commit 024923ba6a
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ def send_http_request(picklable_request, retry_queue):
bare_request = picklable_request.create_request()
s = requests.Session()
prepared_request = s.prepare_request(bare_request)
r = s.send(prepared_request, timeout=StatusReporter._HTTP_REQUEST_TIMEOUT)
r = s.send(prepared_request, timeout=StatusReporter._HTTP_REQUEST_TIMEOUT, verify=False) # SNI is a pain in the ass
t.cancel() # Watchdog no longer needed.
r.raise_for_status() # Raise an exception if there was an http error code returned
logging.info("HTTP request sent successfully.")
@ -140,7 +140,7 @@ def is_web_server_broken(url):
caused by Airtime or the webserver itself being broken temporarily.
'''
try:
test_req = requests.get(url)
test_req = requests.get(url, verify=False)
test_req.raise_for_status()
except Exception as e:
return True