From de0409e7933509993f63a87d11bf3a00e2281f9d Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Wed, 1 Apr 2020 17:09:38 +0530 Subject: [PATCH] ipa: Remove redundant encoding in json.loads (#87) Fixes: ansible/ansible#66592 Signed-off-by: Abhijeet Kasurde --- changelogs/fragments/66592_ipa_encoding_fix.yml | 2 ++ plugins/module_utils/ipa.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/66592_ipa_encoding_fix.yml diff --git a/changelogs/fragments/66592_ipa_encoding_fix.yml b/changelogs/fragments/66592_ipa_encoding_fix.yml new file mode 100644 index 0000000000..14cc2bd504 --- /dev/null +++ b/changelogs/fragments/66592_ipa_encoding_fix.yml @@ -0,0 +1,2 @@ +minor_changes: +- Remove redundant encoding in json.load call in ipa module_utils (https://github.com/ansible/ansible/issues/66592). diff --git a/plugins/module_utils/ipa.py b/plugins/module_utils/ipa.py index c834c873f8..e6f959eda1 100644 --- a/plugins/module_utils/ipa.py +++ b/plugins/module_utils/ipa.py @@ -156,7 +156,7 @@ class IPAClient(object): charset = response_charset else: charset = 'latin-1' - resp = json.loads(to_text(resp.read(), encoding=charset), encoding=charset) + resp = json.loads(to_text(resp.read(), encoding=charset)) err = resp.get('error') if err is not None: self._fail('response %s' % method, err)