Agent: Modify exception message when server connection fails

This commit is contained in:
Mike Salvatore 2022-09-02 08:02:19 -04:00
parent c9a9367dd1
commit 1776b3b0b7
1 changed files with 3 additions and 1 deletions

View File

@ -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)