diff options
author | Adam DePue <adepue@gmail.com> | 2018-11-29 18:22:14 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-11-29 18:22:14 +0000 |
commit | c7c395ce0f3d024243192947fee32d7fc6c063f5 (patch) | |
tree | e229d526adf4b0af23cdae44f39ceb0ace0038b1 /cloudinit/sources/DataSourceAzure.py | |
parent | 4ce8a2858dffcb1f9518b50d884b341f68ac5e63 (diff) | |
download | vyos-cloud-init-c7c395ce0f3d024243192947fee32d7fc6c063f5.tar.gz vyos-cloud-init-c7c395ce0f3d024243192947fee32d7fc6c063f5.zip |
Azure: fix copy/paste error in error handling when reading azure ovf.
Check the appropriate variables based on code review. Correcting what
seems to be a copy/paste mistake for the error handling from a few lines
above.
Diffstat (limited to 'cloudinit/sources/DataSourceAzure.py')
-rw-r--r-- | cloudinit/sources/DataSourceAzure.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index 2a3e5677..be82ec4d 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -953,12 +953,12 @@ def read_azure_ovf(contents): lambda n: n.localName == "LinuxProvisioningConfigurationSet") - if len(results) == 0: + if len(lpcs_nodes) == 0: raise NonAzureDataSource("No LinuxProvisioningConfigurationSet") - if len(results) > 1: + if len(lpcs_nodes) > 1: raise BrokenAzureDataSource("found '%d' %ss" % ("LinuxProvisioningConfigurationSet", - len(results))) + len(lpcs_nodes))) lpcs = lpcs_nodes[0] if not lpcs.hasChildNodes(): |