Don't use len without a comparison

This commit is contained in:
twangboy 2023-06-02 16:03:05 -06:00 committed by Pedro Algarvio
parent 102b9e8407
commit 497b84bb67

View file

@ -6927,7 +6927,7 @@ def _checkAllAdmxPolicies(
if etree.QName(child_item).localname == "boolean":
# https://msdn.microsoft.com/en-us/library/dn605978(v=vs.85).aspx
if len(child_item):
if len(child_item) > 0:
if (
TRUE_VALUE_XPATH(child_item)
and this_element_name not in configured_elements
@ -9195,7 +9195,7 @@ def _get_policy_adm_setting(
)
if etree.QName(child_item).localname == "boolean":
# https://msdn.microsoft.com/en-us/library/dn605978(v=vs.85).aspx
if len(child_item):
if len(child_item) > 0:
if (
TRUE_VALUE_XPATH(child_item)
and this_element_name not in configured_elements