mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
make compatible with both python 2 and 3 by setting the encoding
This commit is contained in:
parent
41176b5e0f
commit
1ff7b258f4
1 changed files with 1 additions and 1 deletions
|
@ -244,7 +244,7 @@ class JsonRpc(object):
|
|||
raise NsoException(
|
||||
'NSO returned HTTP code {0}, expected 200'.format(resp.status), {})
|
||||
|
||||
resp_body = resp.read()
|
||||
resp_body = resp.read().decode('utf8')
|
||||
resp_json = json.loads(resp_body)
|
||||
|
||||
if 'error' in resp_json:
|
||||
|
|
Loading…
Reference in a new issue