def _Dynamic_AddAction(self, request, void):
    if not self.__transactions.has_key(request.transaction().handle()):
      raise apiproxy_errors.ApplicationError(
          datastore_pb.Error.BAD_REQUEST,
          'Transaction handle %d not found' % request.transaction().handle())

    if len(self.__tx_actions) >= _MAX_ACTIONS_PER_TXN:
      raise apiproxy_errors.ApplicationError(
          datastore_pb.Error.BAD_REQUEST,
          'Too many messages, maximum allowed %s' % _MAX_ACTIONS_PER_TXN)

    request.clear_transaction()
    self.__tx_actions.append(request)
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/api/datastore_file_stub.py/DatastoreFileStub._Dynamic_AddAction/original