except KeyboardInterrupt

This commit is contained in:
Alexey Lavrenuke (load testing) 2013-08-26 20:34:56 +04:00
parent 99c6b568ad
commit 62575c309d

View File

@ -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()