Agent: Use response.json() in HTTPIslandAPIClient

This commit is contained in:
Kekoa Kaaikala 2022-09-20 18:33:05 +00:00
parent 022630ddc1
commit 2a1396c82d
1 changed files with 2 additions and 3 deletions

View File

@ -159,8 +159,7 @@ class HTTPIslandAPIClient(IIslandAPIClient):
)
response.raise_for_status()
json_response = json.loads(response.content.decode())
return json_response["stop_agent"]
return response.json()["stop_agent"]
@handle_island_errors
@convert_json_error_to_island_api_error
@ -172,7 +171,7 @@ class HTTPIslandAPIClient(IIslandAPIClient):
)
response.raise_for_status()
config_dict = json.loads(response.text)
config_dict = response.json()
logger.debug(f"Received configuration:\n{pformat(config_dict)}")