1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[stable-5] gconftool2: fix index error (#5687)

Fix index error.
This commit is contained in:
Felix Fontein 2022-12-15 06:48:33 +01:00 committed by GitHub
parent 14f23fbebe
commit a634cc2928
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "gconftool2 - fix crash that prevents setting a key (https://github.com/ansible-collections/community.general/issues/5591, https://github.com/ansible-collections/community.general/pull/5687)."

View file

@ -125,7 +125,7 @@ class GConf2Preference(object):
elif call_type == 'set': elif call_type == 'set':
cmd.extend(direct) cmd.extend(direct)
cmd.extend(config_source) cmd.extend(config_source)
cmd.extend(["--type", self.value_type, "--{3}".format(call_type), self.key, self.value]) cmd.extend(["--type", self.value_type, "--{0}".format(call_type), self.key, self.value])
elif call_type == 'unset': elif call_type == 'unset':
cmd.extend(["--unset", self.key]) cmd.extend(["--unset", self.key])