diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-24 10:21:51 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-24 10:21:51 -0500 |
commit | b37125d7d33ee03b88ad65a0b6930c79c79e9a87 (patch) | |
tree | f0fb1d457acb32087190f89f68d5f385e9cb03a8 | |
parent | 83087580ace7c392477a6772bb0cb254012c8a4e (diff) | |
parent | 31d855041901c86df143b90b7f964c387297f1ca (diff) | |
download | vyos-cloud-init-b37125d7d33ee03b88ad65a0b6930c79c79e9a87.tar.gz vyos-cloud-init-b37125d7d33ee03b88ad65a0b6930c79c79e9a87.zip |
url_helper: call exception_cb with the UrlError exception
previously, we were calling with the exception that was caught rather
than the UrlException, which meant the exception callback couldn't
be assured there would be a status_code.
-rw-r--r-- | cloudinit/url_helper.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py index 42edf9cf..227983f3 100644 --- a/cloudinit/url_helper.py +++ b/cloudinit/url_helper.py @@ -195,7 +195,7 @@ def readurl(url, data=None, timeout=None, retries=0, sec_between=1, # ssl exceptions are not going to get fixed by waiting a # few seconds break - if exception_cb and not exception_cb(filtered_req_args, e): + if exception_cb and not exception_cb(filtered_req_args, excps[-1]): break if i + 1 < manual_tries and sec_between > 0: LOG.debug("Please wait %s seconds while we wait to try again", |