From b6f2bab15bdc2d7bf19493aec7c3a26991c9a511 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 16 Dec 2021 13:50:39 -0500 Subject: [PATCH] Agent: Pass str (not None) to VictimHost constructor --- monkey/infection_monkey/model/victim_host_factory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/model/victim_host_factory.py b/monkey/infection_monkey/model/victim_host_factory.py index 09ef8e98e..358f7ca48 100644 --- a/monkey/infection_monkey/model/victim_host_factory.py +++ b/monkey/infection_monkey/model/victim_host_factory.py @@ -23,7 +23,8 @@ class VictimHostFactory: self.on_island = on_island def build_victim_host(self, network_address: NetworkAddress) -> VictimHost: - victim_host = VictimHost(network_address.ip, network_address.domain) + domain = network_address.domain or "" + victim_host = VictimHost(network_address.ip, domain) if self.tunnel: victim_host.default_tunnel = self.tunnel.get_tunnel_for_ip(victim_host.ip_addr)