def _contextual_locale(context):
    request = context.get('request')
    locale = request.LANGUAGE_CODE
    if not localedata.exists(locale):
        locale = settings.LANGUAGE_CODE
    return locale
Establish that if the job has failed, that we raise the
dataset/ETHPy150Open mozilla/kitsune/kitsune/sumo/templatetags/jinja_helpers.py/_contextual_locale--crossover with--dataset/ETHPy150Open ansible/tower-cli/tests/test_resources_job.py/MonitorTests.test_failure_non_tty