diff options
Diffstat (limited to 'cloudinit/sources/DataSourceScaleway.py')
-rw-r--r-- | cloudinit/sources/DataSourceScaleway.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/sources/DataSourceScaleway.py b/cloudinit/sources/DataSourceScaleway.py index 90056249..e2502b02 100644 --- a/cloudinit/sources/DataSourceScaleway.py +++ b/cloudinit/sources/DataSourceScaleway.py @@ -113,9 +113,9 @@ def query_data_api_once(api_address, timeout, requests_session): retries=0, session=requests_session, # If the error is a HTTP/404 or a ConnectionError, go into raise - # block below. - exception_cb=lambda _, exc: exc.code == 404 or ( - isinstance(exc.cause, requests.exceptions.ConnectionError) + # block below and don't bother retrying. + exception_cb=lambda _, exc: exc.code != 404 and ( + not isinstance(exc.cause, requests.exceptions.ConnectionError) ) ) return util.decode_binary(resp.contents) |