[tor-commits] [ooni-probe/master] Use the new function for determining the geoip data files path

art at torproject.org art at torproject.org
Wed Feb 4 13:27:15 UTC 2015


commit 6d2d12aee6513b69795777505a51685d3e5e06de
Author: Arturo Filastò <art at fuffa.org>
Date:   Sat Jan 3 18:04:07 2015 +0100

    Use the new function for determining the geoip data files path
---
 ooni/geoip.py |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ooni/geoip.py b/ooni/geoip.py
index 9c3ee31..1ff90a7 100644
--- a/ooni/geoip.py
+++ b/ooni/geoip.py
@@ -81,12 +81,8 @@ def database_version():
         }
     }
 
-    geoip_data_dir = config.advanced.get("geoip_data_dir")
-    if not geoip_data_dir:
-        return version
-
     for key in version.keys():
-        geoip_file = os.path.join(geoip_data_dir, key + ".dat")
+        geoip_file = config.get_data_file_path("GeoIP/" + key + ".dat")
         if not os.path.isfile(geoip_file):
             continue
         timestamp = os.stat(geoip_file).st_mtime





More information about the tor-commits mailing list