From 6233fec0f762482d03b03f831074d05f46e910b5 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Thu, 28 Sep 2017 16:14:30 +0300 Subject: [PATCH] If exception thrown from exploit, we now send telemetry about trying --- chaos_monkey/monkey.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chaos_monkey/monkey.py b/chaos_monkey/monkey.py index 99298ebfd..daabad0ee 100644 --- a/chaos_monkey/monkey.py +++ b/chaos_monkey/monkey.py @@ -171,9 +171,11 @@ class ChaosMonkey(object): ControlClient.send_telemetry('exploit', {'result': False, 'machine': machine.__dict__, 'exploiter': exploiter.__class__.__name__}) - except Exception, exc: + except Exception as exc: LOG.error("Exception while attacking %s using %s: %s", machine, exploiter.__class__.__name__, exc) + ControlClient.send_telemetry('exploit', {'result': False, 'machine': machine.__dict__, + 'exploiter': exploiter.__class__.__name__}) continue if successful_exploiter: