diff options
author | eb3095 <45504889+eb3095@users.noreply.github.com> | 2022-02-02 17:26:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 16:26:37 -0600 |
commit | d72e42c9578459f8cf41a0853028206b4e9c7e3a (patch) | |
tree | 822762d90a145100f06052e26dad8aed102e7e69 /cloudinit/sources | |
parent | 7522845dfe8851b7b4f3e9924810b9ccf282bb6e (diff) | |
download | vyos-cloud-init-d72e42c9578459f8cf41a0853028206b4e9c7e3a.tar.gz vyos-cloud-init-d72e42c9578459f8cf41a0853028206b4e9c7e3a.zip |
vultr: Return metadata immediately when found (#1233)
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/helpers/vultr.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/sources/helpers/vultr.py b/cloudinit/sources/helpers/vultr.py index 350ba4ab..190a5640 100644 --- a/cloudinit/sources/helpers/vultr.py +++ b/cloudinit/sources/helpers/vultr.py @@ -35,11 +35,11 @@ def get_metadata(url, timeout, retries, sec_between, agent): # Fetch the metadata v1 = read_metadata(url, timeout, retries, sec_between, agent) + + return json.loads(v1) except (NoDHCPLeaseError, subp.ProcessExecutionError) as exc: LOG.error("DHCP Exception: %s", exc) exception = exc - - return json.loads(v1) raise exception |