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
def run_ransomware():
telemetry_messenger = LegacyTelemetryMessengerAdapter()
batching_telemetry_messenger = BatchingTelemetryMessenger(telemetry_messenger)
try:
telemetry_messenger = LegacyTelemetryMessengerAdapter()
batching_telemetry_messenger = BatchingTelemetryMessenger(telemetry_messenger)
RansomewarePayload(
WormConfiguration.ransomware, batching_telemetry_messenger
).run_payload()