Skip to content

Commit

Permalink
Azure: fix copy/paste error in error handling when reading azure ovf.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adepue authored and Server Team CI Bot committed Nov 29, 2018
1 parent 4ce8a28 commit c7c395c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cloudinit/sources/DataSourceAzure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit c7c395c

Please sign in to comment.