diff --git a/cloudinit/sources/helpers/azure.py b/cloudinit/sources/helpers/azure.py index 8e9eb93d412..7e79f19e8e4 100644 --- a/cloudinit/sources/helpers/azure.py +++ b/cloudinit/sources/helpers/azure.py @@ -1013,7 +1013,7 @@ def parse_text(cls, ovf_env_xml: str) -> "OvfEnvXml": raise errors.ReportableErrorOvfParsingException(exception=e) from e # If there's no provisioning section, it's not Azure ovf-env.xml. - if not root.find("./wa:ProvisioningSection", cls.NAMESPACES): + if root.find("./wa:ProvisioningSection", cls.NAMESPACES) is None: raise NonAzureDataSource( "Ignoring non-Azure ovf-env.xml: ProvisioningSection not found" )