mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed a NameError in geoip/libgeoip if the GeoIP library is not found.
Thx to Bouke Haarsma for the report.
This commit is contained in:
@@ -19,8 +19,8 @@ else:
|
|||||||
|
|
||||||
# Getting the path to the GeoIP library.
|
# Getting the path to the GeoIP library.
|
||||||
if lib_name: lib_path = find_library(lib_name)
|
if lib_name: lib_path = find_library(lib_name)
|
||||||
if lib_path is None: raise GeoIPException('Could not find the GeoIP library (tried "%s"). '
|
if lib_path is None: raise RuntimeError('Could not find the GeoIP library (tried "%s"). '
|
||||||
'Try setting GEOIP_LIBRARY_PATH in your settings.' % lib_name)
|
'Try setting GEOIP_LIBRARY_PATH in your settings.' % lib_name)
|
||||||
lgeoip = CDLL(lib_path)
|
lgeoip = CDLL(lib_path)
|
||||||
|
|
||||||
# Getting the C `free` for the platform.
|
# Getting the C `free` for the platform.
|
||||||
|
|||||||
Reference in New Issue
Block a user