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
1 changed files with 1 additions and 1 deletions

View File

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