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.
This commit is contained in:
parent
54c81a1c93
commit
6eda8d784a
|
@ -41,7 +41,7 @@ try:
|
||||||
from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform
|
from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform
|
||||||
from django.contrib.gis.gdal.geometries import OGRGeometry
|
from django.contrib.gis.gdal.geometries import OGRGeometry
|
||||||
HAS_GDAL = True
|
HAS_GDAL = True
|
||||||
except ImportError:
|
except Exception:
|
||||||
HAS_GDAL = False
|
HAS_GDAL = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue