Skip to content

Commit

Permalink
chore: do not test element's truth value directly (canonical#5856)
Browse files Browse the repository at this point in the history
DeprecationWarning: Testing an element's truth value will
always return True in future versions

canonicalGH-5175
  • Loading branch information
aciba90 authored and mathmarchand committed Nov 21, 2024
1 parent 19bb139 commit 220f85b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudinit/sources/helpers/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 220f85b

Please sign in to comment.