Merge pull request #48893 from Ch3LL/http_tests

handle when ca_certs is None in utils.http
This commit is contained in:
Nicole Thomas 2018-08-03 16:30:47 -04:00 committed by GitHub
commit 848e26ed0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -489,7 +489,10 @@ def query(url,
if verify_ssl:
# tornado requires a str, cannot be unicode str in py2
req_kwargs['ca_certs'] = salt.utils.stringutils.to_str(ca_bundle)
if ca_bundle is None:
req_kwargs['ca_certs'] = ca_bundle
else:
req_kwargs['ca_certs'] = salt.utils.stringutils.to_str(ca_bundle)
max_body = opts.get('http_max_body', salt.config.DEFAULT_MINION_OPTS['http_max_body'])
timeout = opts.get('http_request_timeout', salt.config.DEFAULT_MINION_OPTS['http_request_timeout'])