diff options
Diffstat (limited to 'django/utils/translation/trans_real.py')
| -rw-r--r-- | django/utils/translation/trans_real.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 4439fdad3f..1c42330451 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -517,7 +517,7 @@ def get_supported_language_variant(lang_code, strict=False): # There is a generic variant under the maximum length accepted length. lang_code = lang_code[:index] else: - raise ValueError("'lang_code' exceeds the maximum accepted length") + raise LookupError(lang_code) # If 'zh-hant-tw' is not supported, try special fallback or subsequent # language codes i.e. 'zh-hant' and 'zh'. possible_lang_codes = [lang_code] |
