From 365376a19013ce8157a4e38ca619c4b962581ab9 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Mon, 19 Sep 2022 18:46:34 +0530 Subject: [PATCH] Agent: Change exception handling and log message in ControlClient.get_pba_file() --- monkey/infection_monkey/control.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/control.py b/monkey/infection_monkey/control.py index 2bb5e324f..56db8a652 100644 --- a/monkey/infection_monkey/control.py +++ b/monkey/infection_monkey/control.py @@ -84,5 +84,5 @@ class ControlClient: def get_pba_file(self, filename): try: HTTPIslandAPIClient.get_pba_file(self.server_address, filename) - except requests.exceptions.RequestException: - return False + except Exception as exc: + logger.warning(f"Error connecting to control server {self.server_address}: {exc}")