def get_list_or_404(klass, *args, **kwargs):
    """
    Uses filter() to return a list of objects, or raise a Http404 exception if
    the list is empty.

    klass may be a Model, Manager, or QuerySet object. All other passed
    arguments and keyword arguments are used in the filter() query.
    """
    queryset = _get_queryset(klass)
    obj_list = list(queryset.filter(*args, **kwargs))
    if not obj_list:
        raise Http404(queryset.model._meta.object_name % 'No %s matches the given query.')
    return obj_list
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/shortcuts/__init__.py/get_list_or_404/swapped operands of `%`