[tor-commits] [ooni-probe/master] Only include the GeoIP data file if it does not exist

art at torproject.org art at torproject.org
Mon Jan 13 13:46:16 UTC 2014


commit 08e11259fb7edf9f44e75a278b849821c09c5fc3
Author: Arturo Filastò <art at fuffa.org>
Date:   Sun Jan 12 18:30:15 2014 +0100

    Only include the GeoIP data file if it does not exist
---
 setup.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index bd9ebcf..5f97f42 100644
--- a/setup.py
+++ b/setup.py
@@ -70,11 +70,12 @@ else:
     data_files = [(
         '/usr/share/GeoIP/', 
         [
-            'data/GeoIP.dat',
             'data/GeoIPASNum.dat',
             'data/GeoLiteCity.dat'
         ]
     )]
+    if not os.path.exists('/usr/share/GeoIP/GeoIP.dat'):
+        data_files[0][1].append('data/GeoIP.dat')
 
 for root, dirs, file_names in os.walk('data/'):
     files = []





More information about the tor-commits mailing list