diff options
Diffstat (limited to 'cloudinit/url_helper.py')
| -rw-r--r-- | cloudinit/url_helper.py | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py index f2e1390e..936f7da5 100644 --- a/cloudinit/url_helper.py +++ b/cloudinit/url_helper.py @@ -252,9 +252,9 @@ def readurl(url, data=None, timeout=None, retries=0, sec_between=1,              # attrs              return UrlResponse(r)          except exceptions.RequestException as e: -            if (isinstance(e, (exceptions.HTTPError)) -                    and hasattr(e, 'response')  # This appeared in v 0.10.8 -                    and hasattr(e.response, 'status_code')): +            if (isinstance(e, (exceptions.HTTPError)) and +               hasattr(e, 'response') and  # This appeared in v 0.10.8 +               hasattr(e.response, 'status_code')):                  excps.append(UrlError(e, code=e.response.status_code,                                        headers=e.response.headers,                                        url=url))  | 
