From 24f99676195333aa345fb955cdc8d2d0cd08efa3 Mon Sep 17 00:00:00 2001 From: Baptiste Mispelon Date: Wed, 9 Oct 2013 11:53:43 +0200 Subject: [PATCH] Fixed regression introduced by 20472aa827669d2b83b74e521504e88e18d086a1. The wrong exception was being caught when detecting the presence of GeoIP. Thanks to ramiro for the report. --- django/contrib/gis/geoip/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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