Agent: Fix Island API client import in network/relay/utils.py

This commit is contained in:
Shreya Malviya 2022-09-19 17:24:29 +05:30 committed by Ilija Lazoroski
parent 11da608fe6
commit 8a4666fba2
1 changed files with 3 additions and 3 deletions

View File

@ -6,8 +6,8 @@ from typing import Dict, Iterable, Iterator, MutableMapping, Optional
from common.network.network_utils import address_to_ip_port from common.network.network_utils import address_to_ip_port
from infection_monkey.network.relay import RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST from infection_monkey.network.relay import RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST
from infection_monkey.transport import IslandApiClient from infection_monkey.transport import (
from infection_monkey.transport.island_api_client_errors import ( IslandAPIClient,
IslandAPIConnectionError, IslandAPIConnectionError,
IslandAPIError, IslandAPIError,
IslandAPITimeoutError, IslandAPITimeoutError,
@ -54,7 +54,7 @@ def _check_if_island_server(server: str) -> bool:
logger.debug(f"Trying to connect to server: {server}") logger.debug(f"Trying to connect to server: {server}")
try: try:
_ = IslandApiClient(server) _ = IslandAPIClient(server)
return True return True
except IslandAPIConnectionError as err: except IslandAPIConnectionError as err: