@tornado.gen.coroutine
    def _disbatch_local(self, chunk):
        '''
        Dispatch local client commands
        '''
        chunk_ret = {}

        f_call = salt.utils.format_call(self.saltclients['local'], chunk)
        # fire a job off
        try:
            pub_data = self.saltclients['local'](*f_call.get('args', ()), **f_call.get('kwargs', {}))
        except EauthAuthenticationError:
            raise tornado.gen.Return('Not authorized to run this job')

        # if the job didn't publish, lets not wait around for nothing
        # TODO: set header??
        if pub_data not in 'jid':
            raise tornado.gen.Return('No minions matched the target. No command was sent, no jid was assigned.')

        # seed minions_remaining with the pub_data
        minions_remaining = pub_data['minions']

        syndic_min_wait = None
        if self.application.opts['order_masters']:
            syndic_min_wait = tornado.gen.sleep(self.application.opts['syndic_wait'])

        job_not_running = self.job_not_running(pub_data['jid'],
                                               chunk['tgt'],
                                               f_call['kwargs']['expr_form'],
                                               minions_remaining=minions_remaining
                                               )

        # if we have a min_wait, do that
        if syndic_min_wait is not None:
            yield syndic_min_wait
        # we are completed when either all minions return or the job isn't running anywhere
        chunk_ret = yield self.all_returns(pub_data['jid'],
                                           finish_futures=[job_not_running],
                                           minions_remaining=minions_remaining,
                                           )

        raise tornado.gen.Return(chunk_ret)
dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_tornado/saltnado.py/SaltAPIHandler._disbatch_local/swapped operands of `not in`