handle when ca_certs is None in utils.http

This commit is contained in:
Ch3LL 2018-08-02 14:49:29 -04:00
parent 1fb7d9431b
commit 5674dddb2a
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

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'])