1
0
mirror of https://github.com/django/django.git synced 2024-12-25 10:35:48 +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:
Claude Paroz 2012-09-24 16:03:12 +02:00
parent 54c81a1c93
commit 6eda8d784a

View File

@ -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: