      """
      if lang_code:
          # If 'fr-ca' is not supported, try special fallback or language-only 'fr'.
          possible_lang_codes = [lang_code]
          with suppress(KeyError):
              possible_lang_codes.extend(LANG_INFO[lang_code]['fallback'])
          generic_lang_code = lang_code.split('-')[0]
          possible_lang_codes.append(generic_lang_code)
          supported_lang_codes = get_languages()
  
 
</s> remove     with suppress(KeyError):
 </s> add     try: </s> remove     with suppress(KeyError):
 </s> add     try: </s> remove             with suppress(GDALException):
 </s> add             try:
        try:
      """
      if lang_code:
          # If 'fr-ca' is not supported, try special fallback or language-only 'fr'.
          possible_lang_codes = [lang_code]
        try:
              possible_lang_codes.extend(LANG_INFO[lang_code]['fallback'])
          generic_lang_code = lang_code.split('-')[0]
          possible_lang_codes.append(generic_lang_code)
          supported_lang_codes = get_languages()
  
keep keep keep keep replace keep keep keep keep keep
 Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."

This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda
because try/except performs better. 
django/utils/translation/trans_real.py