mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't use len without a comparison
This commit is contained in:
parent
102b9e8407
commit
497b84bb67
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue