[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Only print what we are actually doing.



commit e3aab12ae94720c3be96e8152c4ba13f957cdf69
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Thu Dec 26 21:36:04 2013 +0100

    Only print what we are actually doing.
---
 ooni/director.py |    3 ++-
 ooni/oonicli.py  |    9 +++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/ooni/director.py b/ooni/director.py
index 46dd962..05344af 100644
--- a/ooni/director.py
+++ b/ooni/director.py
@@ -122,7 +122,6 @@ class Director(object):
         self.netTests = self.getNetTests()
 
         if config.advanced.start_tor:
-            log.msg("Starting Tor...")
             yield self.startTor()
 
         config.probe_ip = geoip.ProbeIP()
@@ -264,6 +263,8 @@ class Director(object):
         Launches a Tor with :param: socks_port :param: control_port
         :param: tor_binary set in ooniprobe.conf
         """
+        log.msg("Starting Tor...")
+
         @defer.inlineCallbacks
         def state_complete(state):
             config.tor_state = state
diff --git a/ooni/oonicli.py b/ooni/oonicli.py
index c5e7c53..9405044 100644
--- a/ooni/oonicli.py
+++ b/ooni/oonicli.py
@@ -122,15 +122,10 @@ def runWithDirector():
                      " See ooniprobe.conf privacy.includepcap") 
              sys.exit(2)
 
-    # contains (test_cases, options, cmd_line_options)
-    test_list = []
-
     director = Director()
-    d = director.start()
-
     if global_options['list']:
         print "# Installed nettests"
-        for net_test_id, net_test in director.netTests.items():
+        for net_test_id, net_test in director.getNetTests().items():
             print "* %s (%s/%s)" % (net_test['name'],
                                     net_test['category'], 
                                     net_test['id'])
@@ -138,6 +133,8 @@ def runWithDirector():
 
         sys.exit(0)
 
+    d = director.start()
+
     #XXX: This should mean no bouncer either!
     if global_options['no-collector']:
         log.msg("Not reporting using a collector")



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits