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

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



commit a2468793713723c1811ab01d115b5bdd2cd8c465
Author: aagbsn <aagbsn@xxxxxxxx>
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()



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