summaryrefslogtreecommitdiff
path: root/cloudinit/url_helper.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2014-02-08 12:20:33 -0800
committerJoshua Harlow <harlowja@gmail.com>2014-02-08 12:20:33 -0800
commit098a74e6207f5d91f515fac63e970375d52795c0 (patch)
tree5ffe75bde7cab1d4ea2fea207c81a8870876f53a /cloudinit/url_helper.py
parent7fb9f75e1bd8b8ef36398c7adeb8d18a4fe9745e (diff)
downloadvyos-cloud-init-098a74e6207f5d91f515fac63e970375d52795c0.tar.gz
vyos-cloud-init-098a74e6207f5d91f515fac63e970375d52795c0.zip
Remove HEAD usage and other small adjustments
Diffstat (limited to 'cloudinit/url_helper.py')
-rw-r--r--cloudinit/url_helper.py23
1 files changed, 2 insertions, 21 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py
index 76a8e29b..a477b185 100644
--- a/cloudinit/url_helper.py
+++ b/cloudinit/url_helper.py
@@ -166,35 +166,16 @@ def _get_ssl_args(url, ssl_details):
return ssl_args
-def existsurl(url, ssl_details=None, timeout=None):
- r = _readurl(url, ssl_details=ssl_details, timeout=timeout,
- method='HEAD', check_status=False)
- return r.ok()
-
-
def readurl(url, data=None, timeout=None, retries=0, sec_between=1,
- headers=None, headers_cb=None, ssl_details=None,
- check_status=True, allow_redirects=True, exception_cb=None):
- return _readurl(url, data=data, timeout=timeout, retries=retries,
- sec_between=sec_between, headers=headers,
- headers_cb=headers_cb, ssl_details=ssl_details,
- check_status=check_status,
- allow_redirects=allow_redirects,
- exception_cb=exception_cb)
-
-
-def _readurl(url, data=None, timeout=None, retries=0, sec_between=1,
headers=None, headers_cb=None, ssl_details=None,
- check_status=True, allow_redirects=True, exception_cb=None,
- method='GET'):
+ check_status=True, allow_redirects=True, exception_cb=None):
url = _cleanurl(url)
req_args = {
'url': url,
}
req_args.update(_get_ssl_args(url, ssl_details))
- scheme = urlparse(url).scheme # pylint: disable=E1101
req_args['allow_redirects'] = allow_redirects
- req_args['method'] = method
+ req_args['method'] = 'GET'
if timeout is not None:
req_args['timeout'] = max(float(timeout), 0)
if data: