Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Need to catch `ImproperlyConfigured` to be freed from the schackles o…

…f `DJANGO_SETTINGS_MODULE`.
  • Loading branch information...
commit 950e6183c60d368c62f627eaed54961be0a207d8 1 parent ab8c970
Justin Bronn jbronn authored
5 django/contrib/gis/gdal/libgdal.py
View
@@ -7,7 +7,7 @@
from ctypes.util import find_library
from django.contrib.gis.gdal.error import OGRException
-
+from django.core.exceptions import ImproperlyConfigured
logger = logging.getLogger('django.contrib.gis')
@@ -15,7 +15,8 @@
try:
from django.conf import settings
lib_path = settings.GDAL_LIBRARY_PATH
-except (AttributeError, EnvironmentError, ImportError):
+except (AttributeError, EnvironmentError,
+ ImportError, ImproperlyConfigured):
lib_path = None
if lib_path:
5 django/contrib/gis/geos/libgeos.py
View
@@ -13,7 +13,7 @@
from ctypes.util import find_library
from django.contrib.gis.geos.error import GEOSException
-
+from django.core.exceptions import ImproperlyConfigured
logger = logging.getLogger('django.contrib.gis')
@@ -21,7 +21,8 @@
try:
from django.conf import settings
lib_path = settings.GEOS_LIBRARY_PATH
-except (AttributeError, EnvironmentError, ImportError):
+except (AttributeError, EnvironmentError,
+ ImportError, ImproperlyConfigured):
lib_path = None
# Setting the appropriate names for the GEOS-C library.
Please sign in to comment.
Something went wrong with that request. Please try again.