1
0
mirror of https://github.com/ansible-collections/community.general.git synced 2025-07-29 07:41:16 +03:00

xfconf: fix setting of boolean values (#5007)

This commit is contained in:
Felix Fontein
2022-07-27 07:42:25 +02:00
committed by GitHub
parent 76b235c6b3
commit 9290381bea
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- "xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, https://github.com/ansible-collections/community.general/pull/5007)."

View File

@ -14,7 +14,7 @@ def _values_fmt(values, value_types):
result = [] result = []
for value, value_type in zip(values, value_types): for value, value_type in zip(values, value_types):
if value_type == 'bool': if value_type == 'bool':
value = boolean(value) value = 'true' if boolean(value) else 'false'
result.extend(['--type', '{0}'.format(value_type), '--set', '{0}'.format(value)]) result.extend(['--type', '{0}'.format(value_type), '--set', '{0}'.format(value)])
return result return result