From 1776b3b0b701e53aa63605d4463817e6b2d9606f Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 2 Sep 2022 08:02:19 -0400 Subject: [PATCH] Agent: Modify exception message when server connection fails --- monkey/infection_monkey/monkey.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 77c7be333..966d27842 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -153,7 +153,9 @@ class InfectionMonkey: if self._current_server_is_set(): logger.debug(f"Default server set to: {self._control_client.server_address}") else: - raise Exception(f"Monkey couldn't find servers: {self._opts.servers} .") + raise Exception( + f"Failed to connect to the island via any known server address: {self._opts.servers}" + ) self._control_client.wakeup(parent=self._opts.parent)