summaryrefslogtreecommitdiff
path: root/cloudinit/url_helper.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2014-02-08 13:28:07 -0800
committerJoshua Harlow <harlowja@gmail.com>2014-02-08 13:28:07 -0800
commit1edc8d3697d05f66195b9a425771f60cf6f9c27e (patch)
tree898b4444c58822b92aefa42923125780ba7f5d69 /cloudinit/url_helper.py
parentea05883f88cedd5ed099aed19d4c5df563525097 (diff)
downloadvyos-cloud-init-1edc8d3697d05f66195b9a425771f60cf6f9c27e.tar.gz
vyos-cloud-init-1edc8d3697d05f66195b9a425771f60cf6f9c27e.zip
Update requests ssl not supported message
Diffstat (limited to 'cloudinit/url_helper.py')
-rw-r--r--cloudinit/url_helper.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py
index a477b185..43e879d2 100644
--- a/cloudinit/url_helper.py
+++ b/cloudinit/url_helper.py
@@ -39,6 +39,7 @@ NOT_FOUND = httplib.NOT_FOUND
# Check if requests has ssl support (added in requests >= 0.8.8)
SSL_ENABLED = False
CONFIG_ENABLED = False # This was added in 0.7 (but taken out in >=1.0)
+_REQ_VER = None
try:
from distutils.version import LooseVersion
import pkg_resources
@@ -152,7 +153,8 @@ def _get_ssl_args(url, ssl_details):
scheme = urlparse(url).scheme # pylint: disable=E1101
if scheme == 'https' and ssl_details:
if not SSL_ENABLED:
- LOG.warn("SSL is not enabled, cert. verification can not occur!")
+ LOG.warn("SSL is not supported in requests v%s, "
+ "cert. verification can not occur!", _REQ_VER)
else:
if 'ca_certs' in ssl_details and ssl_details['ca_certs']:
ssl_args['verify'] = ssl_details['ca_certs']