Agent: Simplify logic in _build_server_list() in monkey/infection_monkey/monkey.py

Co-authored-by: VakarisZ <36815064+VakarisZ@users.noreply.github.com>
This commit is contained in:
Shreya Malviya 2022-09-27 17:17:09 +05:30 committed by GitHub
parent 01f1d62272
commit 4f3a8a5b2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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