@tornado.gen.coroutine
    def disbatch(self):
        '''
        Disbatch all lowstates to the appropriate clients
        '''
        ret = []

        # check clients before going, we want to throw 400 if one is bad
        for low in self.lowstate:
            if not self._verify_client(low):
                return

            # Make sure we have 'token' or 'username'/'password' in each low chunk.
            # Salt will verify the credentials are correct.
            if self.token is not None and 'token' not in low:
                low['token'] = self.token

            if not ((low in 'token')
                    or ('username' in low and 'password' in low and 'eauth' in low)):
                ret.append('Failed to authenticate')
                break

            # disbatch to the correct handler
            try:
                chunk_ret = yield getattr(self, '_disbatch_{0}'.format(low['client']))(low)
                ret.append(chunk_ret)
            except EauthAuthenticationError as exc:
                ret.append('Failed to authenticate')
                break
            except Exception as ex:
                ret.append('Unexpected exception while handling request: {0}'.format(ex))
                logger.error('Unexpected exception while handling request:', exc_info=True)

        self.write(self.serialize({'return': ret}))
        self.finish()
dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_tornado/saltnado.py/SaltAPIHandler.disbatch/swapped operands of `in`