forked from p15670423/monkey
Agent: Fix AgentConfiguration object creation logic in ControlChannel.get_config()
This commit is contained in:
parent
0f21ad2e09
commit
f841bc041b
|
@ -93,9 +93,11 @@ class ControlChannel(IControlChannel):
|
|||
)
|
||||
response.raise_for_status()
|
||||
|
||||
logger.debug(f"Received configuration:\n{pformat(json.loads(response.text))}")
|
||||
config_dict = json.loads(response.text)
|
||||
|
||||
return AgentConfiguration.from_json(response.text)
|
||||
logger.debug(f"Received configuration:\n{pformat(config_dict)}")
|
||||
|
||||
return AgentConfiguration(**config_dict)
|
||||
except (
|
||||
json.JSONDecodeError,
|
||||
requests.exceptions.ConnectionError,
|
||||
|
|
Loading…
Reference in New Issue