summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceScaleway.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources/DataSourceScaleway.py')
-rw-r--r--cloudinit/sources/DataSourceScaleway.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceScaleway.py b/cloudinit/sources/DataSourceScaleway.py
index b0b19c93..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)
@@ -215,7 +215,7 @@ class DataSourceScaleway(sources.DataSource):
def get_public_ssh_keys(self):
return [key['key'] for key in self.metadata['ssh_public_keys']]
- def get_hostname(self, fqdn=False, resolve_ip=False):
+ def get_hostname(self, fqdn=False, resolve_ip=False, metadata_only=False):
return self.metadata['hostname']
@property