[tor-commits] [ooni-probe/master] Fix problem in starting Tor when no test helper is set.

art at torproject.org art at torproject.org
Tue Aug 19 11:50:21 UTC 2014


commit a0fe8cef28fe62f858e647188e169543f005bfea
Author: Arturo Filastò <art at fuffa.org>
Date:   Tue Aug 19 11:03:17 2014 +0200

    Fix problem in starting Tor when no test helper is set.
---
 ooni/oonibclient.py |    5 ++---
 ooni/oonicli.py     |    4 +++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ooni/oonibclient.py b/ooni/oonibclient.py
index 9e08c74..05436e0 100644
--- a/ooni/oonibclient.py
+++ b/ooni/oonibclient.py
@@ -30,7 +30,7 @@ class OONIBClient(object):
             raise e.InvalidOONIBBouncerAddress
 
         elif self.address.startswith('http://'):
-            log.msg("Warning using unencrypted collector")
+            log.msg("Warning using unencrypted backend")
             agent = Agent(reactor)
 
         attempts = 0
@@ -205,10 +205,9 @@ class OONIBClient(object):
     @defer.inlineCallbacks
     def lookupTestHelpers(self, test_helper_names):
         try:
-
             test_helper = yield self.queryBackend('POST', '/bouncer',
                             query={'test-helpers': test_helper_names})
-        except Exception, exc:
+        except Exception as exc:
             log.exception(exc)
             raise e.CouldNotFindTestHelper
 
diff --git a/ooni/oonicli.py b/ooni/oonicli.py
index be242f5..f8cf849 100644
--- a/ooni/oonicli.py
+++ b/ooni/oonicli.py
@@ -168,10 +168,12 @@ def runWithDirector(logging=True, start_tor=True, check_incoherences=True):
     if global_options['no-collector']:
         log.msg("Not reporting using a collector")
         global_options['collector'] = None
+        start_tor = False
+    else:
+        start_tor = True
 
     deck = Deck(no_collector=global_options['no-collector'])
     deck.bouncer = global_options['bouncer']
-    start_tor = False
     if global_options['collector']:
         start_tor |= True
 





More information about the tor-commits mailing list