From a8383f4a79167442f6200b09e6813231a0f93076 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 3 Oct 2022 13:24:09 -0400 Subject: [PATCH] Agent: Add docstrings to notify_relay_on_propagation --- .../notify_relay_on_propagation.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/monkey/infection_monkey/agent_event_handlers/notify_relay_on_propagation.py b/monkey/infection_monkey/agent_event_handlers/notify_relay_on_propagation.py index 7cd85ec4a..0d1991931 100644 --- a/monkey/infection_monkey/agent_event_handlers/notify_relay_on_propagation.py +++ b/monkey/infection_monkey/agent_event_handlers/notify_relay_on_propagation.py @@ -8,10 +8,22 @@ logger = logging.getLogger(__name__) class notify_relay_on_propagation: + """ + Notifies a TCPRelay of potential relay users if propagation is successful + """ + def __init__(self, tcp_relay: Optional[TCPRelay]): + """ + :param tcp_relay: A TCPRelay to notify on successful propagation + """ self._tcp_relay = tcp_relay def __call__(self, event: PropagationEvent): + """ + Notify a TCPRelay of potential relay users if propagation is successful + + :param event: A `PropagationEvent` + """ if self._tcp_relay is None: return