diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-09-24 16:03:12 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-09-24 16:06:04 +0200 |
| commit | 6eda8d784a128309a67540fb0a62373667958daa (patch) | |
| tree | 33c465501003af26edecc73e3a195a1b1b3906b5 | |
| parent | 54c81a1c936f3682e3405d6737958fdffa39bed9 (diff) | |
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.
| -rw-r--r-- | django/contrib/gis/gdal/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/gis/gdal/__init__.py b/django/contrib/gis/gdal/__init__.py index f477f05982..de41df90ff 100644 --- a/django/contrib/gis/gdal/__init__.py +++ b/django/contrib/gis/gdal/__init__.py @@ -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: |
