← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~adepue/cloud-init:master into cloud-init:master

 

Adam DePue has proposed merging ~adepue/cloud-init:master into cloud-init:master.

Commit message:
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.

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~adepue/cloud-init/+git/cloud-init/+merge/359630
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~adepue/cloud-init:master into cloud-init:master.
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 2a3e567..be82ec4 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():

Follow ups