agent: Move telemetry messenger construction out of "try"

This commit is contained in:
Mike Salvatore 2021-06-28 11:25:13 -04:00
parent 13c9e41a4c
commit be6e76757d
1 changed files with 2 additions and 2 deletions

View File

@ -472,9 +472,9 @@ class InfectionMonkey(object):
@staticmethod @staticmethod
def run_ransomware(): def run_ransomware():
try:
telemetry_messenger = LegacyTelemetryMessengerAdapter() telemetry_messenger = LegacyTelemetryMessengerAdapter()
batching_telemetry_messenger = BatchingTelemetryMessenger(telemetry_messenger) batching_telemetry_messenger = BatchingTelemetryMessenger(telemetry_messenger)
try:
RansomewarePayload( RansomewarePayload(
WormConfiguration.ransomware, batching_telemetry_messenger WormConfiguration.ransomware, batching_telemetry_messenger
).run_payload() ).run_payload()