This commit is contained in:
j 2012-09-15 14:04:38 +02:00
parent 4fc3842112
commit 148912ab37

View file

@ -149,7 +149,7 @@ def update_geoip(force=False):
if not os.path.exists(path) or force: if not os.path.exists(path) or force:
url = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz' url = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
print 'download', url print 'download', url
ox.net.saveUrl(url, "%s.gz"%path) ox.net.save_url(url, "%s.gz"%path)
if os.path.exists(path): if os.path.exists(path):
os.unlink(path) os.unlink(path)
os.system('gunzip "%s.gz"' % path) os.system('gunzip "%s.gz"' % path)