[tor-commits] [ooni-probe/master] Skip calculating the version of the geoip files that are not found

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


commit be5eb6e9288ecb82d152aff18dcab533919ccf4a
Author: Arturo Filastò <art at fuffa.org>
Date:   Sun Jan 4 12:29:03 2015 +0100

    Skip calculating the version of the geoip files that are not found
---
 ooni/geoip.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ooni/geoip.py b/ooni/geoip.py
index 1ff90a7..1dbc7c2 100644
--- a/ooni/geoip.py
+++ b/ooni/geoip.py
@@ -83,7 +83,7 @@ def database_version():
 
     for key in version.keys():
         geoip_file = config.get_data_file_path("GeoIP/" + key + ".dat")
-        if not os.path.isfile(geoip_file):
+        if not geoip_file or not os.path.isfile(geoip_file):
             continue
         timestamp = os.stat(geoip_file).st_mtime
 





More information about the tor-commits mailing list