Commit 6eda8d78 authored by Claude Paroz's avatar Claude Paroz
Browse files

Enlarged exception catching when testing for GDAL presence

Other import errors than ImportError can happen during import of
GDAL files (e.g. OGRException). Some further auditing may be needed
if we want to restrict the catched exceptions at a later stage.
Thanks Ramiro Morales for raising the issue.
parent 54c81a1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ try:
    from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform
    from django.contrib.gis.gdal.geometries import OGRGeometry
    HAS_GDAL = True
except ImportError:
except Exception:
    HAS_GDAL = False

try: