      if '_' in locale:
          locales.append(locale.split('_')[0])
      for location in format_locations:
          for loc in locales:
              with suppress(ImportError):
                  yield import_module('%s.formats' % (location % loc))
  
  
  def get_format_modules(lang=None, reverse=False):
      """Return a list of the format modules found."""
 
</s> remove             with suppress(DatabaseError):
 </s> add             try:
            try:
      if '_' in locale:
          locales.append(locale.split('_')[0])
      for location in format_locations:
          for loc in locales:
            try:
                  yield import_module('%s.formats' % (location % loc))
  
  
  def get_format_modules(lang=None, reverse=False):
      """Return a list of the format modules found."""
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/formats.py