[tor-commits] [ooni-probe/master] Fixed bug in input handling

art at torproject.org art at torproject.org
Mon May 26 16:47:37 UTC 2014


commit c59a59fd8cd13f5684d9d0e4c11bb1fe4ef03adf
Author: kudrom <kudrom at riseup.net>
Date:   Thu May 22 00:43:00 2014 +0200

    Fixed bug in input handling
---
 ooni/director.py |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ooni/director.py b/ooni/director.py
index be5d551..1a00f08 100644
--- a/ooni/director.py
+++ b/ooni/director.py
@@ -128,9 +128,11 @@ class Director(object):
             yield self.getTorState()
 
         if config.global_options['no-geoip']:
-            annotations = config.global_options['annotations'].lower()
-            aux = map(lambda x: x in annotations, ["city", "country", "asn"])
-            if annotations is None or not all(aux):
+            aux = [False]
+            if 'annotations' in config.global_options and config.global_options['annotations'] is not None:
+                annotations = config.global_options['annotations'].lower()
+                aux = map(lambda x: x in annotations, ["city", "country", "asn"])
+            if not all(aux):
                 log.msg("You should add annotations for the country, city and ASN")
         else:
             yield config.probe_ip.lookup()





More information about the tor-commits mailing list