          while path:
              ns = path.pop()
              current_ns = current_path.pop() if current_path else None
              # Lookup the name to see if it could be an app identifier.
              with suppress(KeyError):
                  app_list = resolver.app_dict[ns]
                  # Yes! Path part matches an app in the current Resolver.
                  if current_ns and current_ns in app_list:
                      # If we are reversing for a particular app, use that
                      # namespace.
 
</s> remove         with suppress(KeyError):
 </s> add         try: </s> remove         with suppress(OSError):
 </s> add         try: </s> remove     with suppress(KeyError):
 </s> add     try:
            try:
          while path:
              ns = path.pop()
              current_ns = current_path.pop() if current_path else None
              # Lookup the name to see if it could be an app identifier.
            try:
                  app_list = resolver.app_dict[ns]
                  # Yes! Path part matches an app in the current Resolver.
                  if current_ns and current_ns in app_list:
                      # If we are reversing for a particular app, use that
                      # namespace.
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/urls/base.py