summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2013-10-09 11:53:43 +0200
committerBaptiste Mispelon <bmispelon@gmail.com>2013-10-09 11:53:43 +0200
commit24f99676195333aa345fb955cdc8d2d0cd08efa3 (patch)
treec4f57875405b7f3a7c70441037fe209ccd3822dd
parenta971d19bab9bfc33d301669b319b4766bf6d94f6 (diff)
Fixed regression introduced by 20472aa827669d2b83b74e521504e88e18d086a1.
The wrong exception was being caught when detecting the presence of GeoIP. Thanks to ramiro for the report.
-rw-r--r--django/contrib/gis/geoip/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/gis/geoip/__init__.py b/django/contrib/gis/geoip/__init__.py
index 572c778e81..edb395f508 100644
--- a/django/contrib/gis/geoip/__init__.py
+++ b/django/contrib/gis/geoip/__init__.py
@@ -14,5 +14,5 @@
try:
from .base import GeoIP, GeoIPException
HAS_GEOIP = True
-except ImportError:
+except RuntimeError: # libgeoip.py raises a RuntimeError if no GeoIP library is found
HAS_GEOIP = False