def _process_exit_survey_results():
    """Collect and save new exit survey results."""
    # Gather and process up until yesterday's exit survey results.
    yes_kind, _ = MetricKind.objects.get_or_create(code=EXIT_SURVEY_YES_CODE)
    no_kind, _ = MetricKind.objects.get_or_create(code=EXIT_SURVEY_NO_CODE)
    dunno_kind, _ = MetricKind.objects.get_or_create(
        code=EXIT_SURVEY_DONT_KNOW_CODE)

    latest_metric = _get_latest_metric(EXIT_SURVEY_YES_CODE)
    if latest_metric is not None:
        latest_metric_date = latest_metric.start
    else:
        latest_metric_date = date(2013, 07, 01)

    day = latest_metric_date + timedelta(days=1)
    today = date.today()

    while today < day:
        # Get the aggregated results.
        results = get_exit_survey_results('general', day)

        # Store them.
        Metric.objects.create(
            kind=yes_kind,
            start=day,
            end=day + timedelta(days=1),
            value=results['yes'])
        Metric.objects.create(
            kind=no_kind,
            start=day,
            end=day + timedelta(days=1),
            value=results['no'])
        Metric.objects.create(
            kind=dunno_kind,
            start=day,
            end=day + timedelta(days=1),
            value=results['dont-know'])

        # Move on to next day.
        day += timedelta(days=1)
dataset/ETHPy150Open mozilla/kitsune/kitsune/kpi/cron.py/_process_exit_survey_results/swapped operands of `<`