                      # selects the *first* one, which is arbitrary.
                      object_domain = getattr(obj, field.name).all()[0].domain
                  if object_domain is not None:
                      break
  
          # Next, look for a many-to-one relationship to Site.
          if object_domain is None:
              for field in obj._meta.fields:
 
</s> remove                 with suppress(IndexError):
 </s> add                 try: </s> remove             with suppress(Site.DoesNotExist):
 </s> add             try: </s> remove             with suppress(NoReverseMatch):
 </s> add             try:
                except IndexError:
                    pass
                      # selects the *first* one, which is arbitrary.
                      object_domain = getattr(obj, field.name).all()[0].domain
                except IndexError:
                    pass
                  if object_domain is not None:
                      break
  
          # Next, look for a many-to-one relationship to Site.
          if object_domain is None:
              for field in obj._meta.fields:
keep add keep 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/contrib/contenttypes/views.py