[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Set the tor_state GeoIP class attribute on startup
commit a63b1b1893d3de4c7e7899c7f47bc1e807f4c4e7
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Mon Apr 22 16:23:01 2013 +0200
Set the tor_state GeoIP class attribute on startup
---
ooni/geoip.py | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/ooni/geoip.py b/ooni/geoip.py
index 0f8335f..1e6f6e9 100644
--- a/ooni/geoip.py
+++ b/ooni/geoip.py
@@ -109,12 +109,14 @@ class MaxMindGeoIP(HTTPGeoIPLookupper):
class ProbeIP(object):
strategy = None
- geoIPServices = {'ubuntu': UbuntuGeoIP,
- 'torproject': TorProjectGeoIP,
- 'maxmind': MaxMindGeoIP
- }
address = None
- tor_state = config.tor_state
+
+ def __init__(self):
+ self.tor_state = config.tor_state
+ self.geoIPServices = {'ubuntu': UbuntuGeoIP,
+ 'torproject': TorProjectGeoIP,
+ 'maxmind': MaxMindGeoIP
+ }
@defer.inlineCallbacks
def lookup(self):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits