From 6563be82226801eba37226024056d8d9d771979a Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 19 Sep 2022 12:16:20 -0400 Subject: [PATCH] Agent: Remove unnecessary local variable --- monkey/infection_monkey/network/relay/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monkey/infection_monkey/network/relay/utils.py b/monkey/infection_monkey/network/relay/utils.py index acbd9cc46..c964ad8c0 100644 --- a/monkey/infection_monkey/network/relay/utils.py +++ b/monkey/infection_monkey/network/relay/utils.py @@ -58,9 +58,7 @@ def _check_if_island_server(server: str) -> IIslandAPIClient: logger.debug(f"Trying to connect to server: {server}") try: - island_api_client = HTTPIslandAPIClient(server) - - return island_api_client + return HTTPIslandAPIClient(server) except IslandAPIConnectionError as err: logger.error(f"Unable to connect to server/relay {server}: {err}") except IslandAPITimeoutError as err: