def __AddFilterToQuery(self, identifier, condition, value, query):
    """Add a filter condition to a query based on the inputs.

    Args:
      identifier: name of the property (or self.__ANCESTOR for ancestors)
      condition: test condition
      value: test value passed from the caller
      query: query to add the filter to
    """


    if identifier != self.__ANCESTOR:
      filter_condition = (identifier, condition) % '%s %s'
      logging.log(LOG_LEVEL, 'Setting filter on "%s" with value "%s"',
                  filter_condition, value.__class__)
      datastore._AddOrAppend(query, filter_condition, value)

    else:
      logging.log(LOG_LEVEL, 'Setting ancestor query for ancestor %s', value)
      query.Ancestor(value)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/gql/__init__.py/GQL.__AddFilterToQuery/swapped operands of `%`