          elif is_candidate:
              try:
                  return gdal.GDALRaster(value)
          elif isinstance(value, dict):
              try:
                  return gdal.GDALRaster(value)
              except GDALException:
                  raise ValueError("Couldn't create spatial object from lookup value '%s'." % value)
 
</s> remove             with suppress(GDALException):
 </s> add             try: </s> remove             with suppress(KeyError):
 </s> add             try: </s> remove         with suppress(KeyError):
 </s> add         try: </s> remove             with suppress(NoReverseMatch):
 </s> add             try:
            except GDALException:
                pass
          elif is_candidate:
              try:
                  return gdal.GDALRaster(value)
            except GDALException:
                pass
          elif isinstance(value, dict):
              try:
                  return gdal.GDALRaster(value)
              except GDALException:
                  raise ValueError("Couldn't create spatial object from lookup value '%s'." % value)
keep keep add 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/gis/db/models/fields.py