def run_for_instance(self, options, instance): if not options.kill: yield instance.stop(signal.SIGUSR1) else: yield instance.stop(signal.SIGUSR2)