ipa: Remove redundant encoding in json.loads (#87)

Fixes: ansible/ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/88/head
Abhijeet Kasurde 2020-04-01 17:09:38 +05:30 committed by GitHub
parent 07e8911fd8
commit de0409e793
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 @@
minor_changes:
- Remove redundant encoding in json.load call in ipa module_utils (https://github.com/ansible/ansible/issues/66592).

View File

@ -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)