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.
This commit is contained in:
Scott Moser 2014-01-24 10:21:51 -05:00
commit 66bf6d5459
1 changed files with 1 additions and 1 deletions

View File

@ -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",