mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
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.geometries import OGRGeometry
|
||||
HAS_GDAL = True
|
||||
except ImportError:
|
||||
except Exception:
|
||||
HAS_GDAL = False
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user