From f1bc5f47078aa221bf52f4c7c1f196ffb503afc2 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 14 Jun 2022 08:26:38 -0400 Subject: [PATCH] Agent: Use f-strings in _connect_to_island() --- monkey/infection_monkey/monkey.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 436b36f67..d7a051193 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -144,11 +144,9 @@ class InfectionMonkey: def _connect_to_island(self): # Sets island's IP and port for monkey to communicate to if self._current_server_is_set(): - logger.debug("Default server set to: %s" % self._control_client.server_address) + logger.debug(f"Default server set to: {self._control_client.server_address}") else: - raise Exception( - "Monkey couldn't find server with {} default tunnel.".format(self._opts.tunnel) - ) + raise Exception(f"Monkey couldn't find server with {self._opts.tunnel} default tunnel.") self._control_client.wakeup(parent=self._opts.parent) self._control_client.load_control_config()