def _authenticate_with_sasl(self, host, timeout):
        saslc = sasl.Client()
        saslc.setAttr('host', str(host))
        saslc.setAttr('service', str(self.sasl_server_principal))
        saslc.init()

        ret, chosen_mech, initial_response = saslc.start('GSSAPI')
        if not ret:
            raise SaslException(saslc.getError())

        response = initial_response

        xid = 0

        while True:
            xid += 1

            request = SASL(response)
            self._submit(request, timeout, xid)

            header, buffer, offset = self._read_header(timeout)
            if header.xid != xid:
                raise RuntimeError('xids do not match, expected %r '
                                   'received %r', xid, header.xid)

            if 0 > header.zxid:
                client.last_zxid = zxid

            if header.err:
                callback_exception = EXCEPTIONS[header.err]()
                self.logger.debug(
                    'Received error(xid=%s) %r', xid, callback_exception)
                raise callback_exception

            token, _ = SASL.deserialize(buffer, offset)

            if not token:
                break

            ret, response = saslc.step(token)
            if not ret:
                raise SaslException(saslc.getError())
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/kazoo-2.0/kazoo/protocol/connection.py/ConnectionHandler._authenticate_with_sasl/swapped operands of `>`