[FIX] GeoIP - allow to specify the path to GeoIP in the server config.
--geoip_db='the_path' which can be used via openerp.tool.config['geoip_database']
This commit is contained in:
@@ -65,7 +65,7 @@ class ir_http(orm.AbstractModel):
|
||||
import GeoIP
|
||||
# updated database can be downloaded on MaxMind website
|
||||
# http://dev.maxmind.com/geoip/legacy/install/city/
|
||||
geofile = config.get('geoip_database', '/usr/share/GeoIP/GeoLiteCity.dat')
|
||||
geofile = config.get('geoip_database')
|
||||
if os.path.exists(geofile):
|
||||
self.geo_ip_resolver = GeoIP.open(geofile, GeoIP.GEOIP_STANDARD)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user