From 62575c309d155f024b3ad07cbedec0db4715492d Mon Sep 17 00:00:00 2001 From: "Alexey Lavrenuke (load testing)" Date: Mon, 26 Aug 2013 20:34:56 +0400 Subject: [PATCH] except KeyboardInterrupt --- Tank/Plugins/bfg/worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tank/Plugins/bfg/worker.py b/Tank/Plugins/bfg/worker.py index 9c2883b..1c24878 100644 --- a/Tank/Plugins/bfg/worker.py +++ b/Tank/Plugins/bfg/worker.py @@ -72,7 +72,10 @@ class BFGShooter(object): delay = planned_time - time.time() while th.active_count() >= self.instances: if delay - delay / 2 > 0: - time.sleep(delay - delay / 2) + try: + time.sleep(delay - delay / 2) + except KeyboardInterrupt: + return None delay = planned_time - time.time() task = th.Timer(delay, self._shoot, [missile, marker]) task.start()