[FIX] website: geoip restore city file location
And change the warning message with instruction on how to install the database, debian geoip-database-contrib has a script to easily install it.
This commit is contained in:
@@ -78,7 +78,7 @@ class ir_http(orm.AbstractModel):
|
||||
self._geoip_resolver = GeoIP.open(geofile, GeoIP.GEOIP_STANDARD)
|
||||
else:
|
||||
self._geoip_resolver = False
|
||||
logger.warning('GeoIP database file %r does not exists', geofile)
|
||||
logger.warning('GeoIP database file %r does not exists, apt-get install geoip-database-contrib or download it from http://dev.maxmind.com/geoip/legacy/install/city/', geofile)
|
||||
except ImportError:
|
||||
self._geoip_resolver = False
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ class configmanager(object):
|
||||
type="int")
|
||||
group.add_option("--unaccent", dest="unaccent", my_default=False, action="store_true",
|
||||
help="Use the unaccent function provided by the database when available.")
|
||||
group.add_option("--geoip-db", dest="geoip_database", my_default='/usr/share/GeoIP/GeoIP.dat',
|
||||
group.add_option("--geoip-db", dest="geoip_database", my_default='/usr/share/GeoIP/GeoLiteCity.dat',
|
||||
help="Absolute path to the GeoIP database file.")
|
||||
parser.add_option_group(group)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user