[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:
Antony Lesuisse
2015-05-18 11:46:42 +02:00
parent a910d45cab
commit fffaf40617
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)