From 4f3a8a5b2fce9d32b92979877a8da329192e1e9f Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 27 Sep 2022 17:17:09 +0530 Subject: [PATCH] Agent: Simplify logic in _build_server_list() in monkey/infection_monkey/monkey.py Co-authored-by: VakarisZ <36815064+VakarisZ@users.noreply.github.com> --- monkey/infection_monkey/monkey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index e336e6db9..d8e4962d9 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -262,7 +262,7 @@ class InfectionMonkey: return agent_event_serializer_registry def _build_server_list(self, relay_port: int): - my_servers = [str(s) for s in self._opts.servers] + my_servers = map(str, self._opts.servers) relay_servers = [f"{ip}:{relay_port}" for ip in get_my_ip_addresses()] return my_servers + relay_servers