From 45884ff2338879e6b701ea0455e1adee38303d66 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 21 Jul 2022 14:33:14 +0200 Subject: [PATCH] Agent: Use response.json() in ControlChannel --- monkey/infection_monkey/master/control_channel.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monkey/infection_monkey/master/control_channel.py b/monkey/infection_monkey/master/control_channel.py index b88cd196a..ccff3e783 100644 --- a/monkey/infection_monkey/master/control_channel.py +++ b/monkey/infection_monkey/master/control_channel.py @@ -84,9 +84,7 @@ class ControlChannel(IControlChannel): ) response.raise_for_status() - return [ - Credentials.from_mapping(credentials) for credentials in json.loads(response.text) - ] + return [Credentials.from_mapping(credentials) for credentials in response.json()] except ( requests.exceptions.JSONDecodeError, requests.exceptions.ConnectionError,