commit c79a087b5926e36962290ce1fb76a4301bddd49c
Author: Arturo Filastò <arturo(a)filasto.net>
Date: Sat Apr 23 19:04:14 2016 +0200
Remove references to the geoip_data_dir since it's not respected
---
data/ooniprobe.conf.sample | 1 -
ooni/deckgen/processors/namebench_dns_servers.py | 3 +--
ooni/geoip.py | 6 +++---
ooni/oonicli.py | 1 +
ooni/tests/test_oonicli.py | 1 -
5 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/data/ooniprobe.conf.sample b/data/ooniprobe.conf.sample
index 7aaacd7..5f3f17d 100644
--- a/data/ooniprobe.conf.sample
+++ b/data/ooniprobe.conf.sample
@@ -23,7 +23,6 @@ reports:
pcap: null
collector: null
advanced:
- geoip_data_dir: /usr/share/GeoIP
debug: false
# enable if auto detection fails
#tor_binary: /usr/sbin/tor
diff --git a/ooni/deckgen/processors/namebench_dns_servers.py b/ooni/deckgen/processors/namebench_dns_servers.py
index f35ca93..9855611 100644
--- a/ooni/deckgen/processors/namebench_dns_servers.py
+++ b/ooni/deckgen/processors/namebench_dns_servers.py
@@ -8,7 +8,6 @@ from ooni.settings import config
class GeoIPDB(object):
_borg = {}
country = None
- asn = None
def __init__(self):
self.__dict__ = self._borg
@@ -25,7 +24,7 @@ class GeoIPDB(object):
def generate_country_input(country_code, dst):
csv_file = config.get_data_file_path("resources/"
- "namebench-dns-servers.csv")
+ "namebench-dns-servers.csv")
filename = os.path.join(dst, "dns-server-%s.txt" % country_code)
fw = open(filename, "w")
diff --git a/ooni/geoip.py b/ooni/geoip.py
index 83f3648..6179844 100644
--- a/ooni/geoip.py
+++ b/ooni/geoip.py
@@ -37,9 +37,9 @@ def IPToLocation(ipaddr):
location = {'city': None, 'countrycode': 'ZZ', 'asn': 'AS0'}
def error():
- log.err("Could not find GeoIP data file in %s."
- "Try running ooniresources --update-geoip or"
- " edit your ooniprobe.conf" % config.advanced.geoip_data_dir)
+ log.err("Could not find GeoIP data file in data directories."
+ "Try running ooniresources or"
+ " edit your ooniprobe.conf")
try:
country_dat = GeoIP(country_file)
diff --git a/ooni/oonicli.py b/ooni/oonicli.py
index 5bc2124..8e7d1f1 100644
--- a/ooni/oonicli.py
+++ b/ooni/oonicli.py
@@ -169,6 +169,7 @@ def director_startup_other_failures(failure):
def setupGlobalOptions(logging, start_tor, check_incoherences):
global_options = parseOptions()
+
config.global_options = global_options
config.set_paths()
config.initialize_ooni_home()
diff --git a/ooni/tests/test_oonicli.py b/ooni/tests/test_oonicli.py
index c57205c..c3b179a 100644
--- a/ooni/tests/test_oonicli.py
+++ b/ooni/tests/test_oonicli.py
@@ -39,7 +39,6 @@ reports:
pcap: null
collector: null
advanced:
- geoip_data_dir: /usr/share/GeoIP
debug: false
interface: auto
start_tor: false