summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-03-19 09:51:02 -0400
committerScott Moser <smoser@ubuntu.com>2013-03-19 09:51:02 -0400
commitfc77e3f4bc9b0736246abd05bfca8dda04cff0eb (patch)
tree9e4eb65de06537d1592624790d4804edb4b463ee /cloudinit
parent8fbe938228909e153afb88f189b269df60501510 (diff)
downloadvyos-cloud-init-fc77e3f4bc9b0736246abd05bfca8dda04cff0eb.tar.gz
vyos-cloud-init-fc77e3f4bc9b0736246abd05bfca8dda04cff0eb.zip
do not bother retrying on ssl errors
if the error is an ssl error, its extremely unlikely that it would be fixed by waiting a few seconds and trying again.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/url_helper.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py
index de73cc84..ac6f25db 100644
--- a/cloudinit/url_helper.py
+++ b/cloudinit/url_helper.py
@@ -179,6 +179,10 @@ def readurl(url, data=None, timeout=None, retries=0, sec_between=1,
headers=e.response.headers))
else:
excps.append(UrlError(e))
+ if SSL_ENABLED and isinstance(e, exceptions.SSLError):
+ # ssl exceptions are not going to get fixed by waiting a
+ # few seconds
+ break
if i + 1 < manual_tries and sec_between > 0:
LOG.debug("Please wait %s seconds while we wait to try again",
sec_between)