              try:
                  return Feature(capi.get_feature(self.ptr, feat_id), self)
          else:
              # Random access isn't supported, have to increment through
              # each feature until the given feature ID is encountered.
              for feat in self:
 
</s> remove             with suppress(GDALException):
 </s> add             try: </s> remove     with suppress(KeyError):
 </s> add     try: </s> remove             # SuspiciousFileOperation occurs if the jointed path is located
            # outside of this template_dir (it might be inside another one,
            # so this isn't fatal).
            with suppress(SuspiciousFileOperation):
 </s> add             try: </s> remove             with suppress(Site.DoesNotExist):
 </s> add             try:
            except GDALException:
                pass
              try:
                  return Feature(capi.get_feature(self.ptr, feat_id), self)
            except GDALException:
                pass
          else:
              # Random access isn't supported, have to increment through
              # each feature until the given feature ID is encountered.
              for feat in self:
keep add 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/gis/gdal/layer.py