From fc77e3f4bc9b0736246abd05bfca8dda04cff0eb Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 19 Mar 2013 09:51:02 -0400 Subject: 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. --- cloudinit/url_helper.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cloudinit/url_helper.py') 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) -- cgit v1.2.3