[tor-commits] [ooni-probe/master] Add docstrings to ooni/runner.py

art at torproject.org art at torproject.org
Thu Dec 6 21:39:59 UTC 2012


commit a2468793713723c1811ab01d115b5bdd2cd8c465
Author: aagbsn <aagbsn at extc.org>
Date:   Thu Dec 6 12:28:23 2012 +0000

    Add docstrings to ooni/runner.py
    
    Add docstring to startTor()
    Add docstring to startSniffing()
---
 ooni/runner.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ooni/runner.py b/ooni/runner.py
index bc9b874..723b209 100644
--- a/ooni/runner.py
+++ b/ooni/runner.py
@@ -464,6 +464,10 @@ class UnableToStartTor(Exception):
     pass
 
 def startTor():
+    """ Starts Tor
+    Launches a Tor with :param: socks_port :param: control_port
+    :param: tor_binary set in ooniprobe.conf
+    """
     @defer.inlineCallbacks
     def state_complete(state):
         config.tor_state = state
@@ -522,6 +526,9 @@ def startTor():
     return d
 
 def startSniffing():
+    """ Start sniffing with Scapy. Exits if required privileges (root) are not
+    available.
+    """
     from ooni.utils.txscapy import ScapyFactory, ScapySniffer
     try:
         checkForRoot()





More information about the tor-commits mailing list