deleted extras and fixed downloaded

This commit is contained in:
Nicholas St. Germain 2018-12-01 17:28:50 -06:00
parent 98677892e2
commit ecb330206a
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View file

@ -13,3 +13,4 @@ GeoLite2-City.tar.gz
.idea/
.idea/*
varken.ini
data/

View file

@ -278,7 +278,7 @@ def geoip_download():
for files in tar.getmembers():
if 'GeoLite2-City.mmdb' in files.name:
files.name = os.path.basename(files.name)
tar.extract(files, '{}/'.format(os.path.dirname(os.path.realpath(__file__))))
tar.extract(files, abspath(join('..', 'data')))
os.remove(tar_dbfile)
def geo_lookup(ipaddress):