From 5222d706deb51dc4f23b156cf69d51506c6216b0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 26 Jun 2013 16:10:33 +0200 Subject: [PATCH] also get geolite ipv6 data --- pandora/app/config.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandora/app/config.py b/pandora/app/config.py index d124b7e8..6a825bfc 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -232,6 +232,14 @@ def update_geoip(force=False): if os.path.exists(path): os.unlink(path) os.system('gunzip "%s.gz"' % path) + path = os.path.join(settings.GEOIP_PATH, 'GeoLiteCityv6.dat') + if not os.path.exists(path) or force: + url = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz' + print 'download', url + ox.net.save_url(url, "%s.gz"%path) + if os.path.exists(path): + os.unlink(path) + os.system('gunzip "%s.gz"' % path) def init(): if not settings.RELOADER_RUNNING: