From c7c395ce0f3d024243192947fee32d7fc6c063f5 Mon Sep 17 00:00:00 2001 From: Adam DePue Date: Thu, 29 Nov 2018 18:22:14 +0000 Subject: 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. --- cloudinit/sources/DataSourceAzure.py | 6 +++--- 1 file 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(): -- cgit v1.2.3