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

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

Fixes: ansible/ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
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 charset = response_charset
else: else:
charset = 'latin-1' 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') err = resp.get('error')
if err is not None: if err is not None:
self._fail('response %s' % method, err) self._fail('response %s' % method, err)