Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Always decode as UTF-8
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Ledvina <[email protected]>
  • Loading branch information
jaredledvina committed Mar 29, 2020
1 parent 08042e1 commit de13a47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module_utils/sensu_go.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def request(self, url, method="GET", data=None):
if resp and info['status'] not in [201, 204]:
response = resp.read()
try:
return json.loads(response), info
return json.loads(response.decode('utf-8')), info
except Exception as e:
self.fail_json(
msg='Failed to parse response as JSON: {0}'.format(info),
Expand Down

0 comments on commit de13a47

Please sign in to comment.