changed configparser from python2 to python3

pull/81/head
Andreas Muehlemann 2016-12-07 15:30:49 +01:00
parent 1e1796b414
commit a95af26424
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import json, pygeoip
import sys, logging
import ConfigParser
import configparser
log = logging.getLogger('geoip_country')
log.setLevel(logging.DEBUG)
@ -19,7 +19,7 @@ moduleinfo = {'version': '0.1', 'author': 'Andreas Muehlemann',
'module-type': ['expansion', 'hover']}
# get current db from http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
config = ConfigParser.ConfigParser()
config = configparser.ConfigParser()
config.read('./geoip_contry.cfg')
gi = pygeoip.GeoIP(config.get('defaults', 'database'))