[or-cvs] r14627: Woops. Added a broken __all__ during pydocing. Also need to (torflow/branches/gsoc2008/TorCtl)

mikeperry at seul.org mikeperry at seul.org
Fri May 16 04:37:48 UTC 2008


Author: mikeperry
Date: 2008-05-16 00:37:47 -0400 (Fri, 16 May 2008)
New Revision: 14627

Modified:
   torflow/branches/gsoc2008/TorCtl/TorCtl.py
Log:

Woops. Added a broken __all__ during pydocing. Also need to
quote the authentication string.



Modified: torflow/branches/gsoc2008/TorCtl/TorCtl.py
===================================================================
--- torflow/branches/gsoc2008/TorCtl/TorCtl.py	2008-05-15 20:10:39 UTC (rev 14626)
+++ torflow/branches/gsoc2008/TorCtl/TorCtl.py	2008-05-16 04:37:47 UTC (rev 14627)
@@ -21,9 +21,7 @@
 
 """
 
-__all__ = ["EVENTTYPE", "CIRC", "STREAM", "ORCONN", "STREAM_BW", "BW",
-           "NS", "NEWDESC", "ADDRMAP", "DEBUG", "INFO", "NOTICE", "WARN",
-           "ERR", "TorCtlError", "TorCtlClosed", "ProtocolError",
+__all__ = ["EVENT_TYPE", "TorCtlError", "TorCtlClosed", "ProtocolError",
            "ErrorReply", "NetworkStatus", "ExitPolicyLine", "Router",
            "RouterVersion", "Connection", "parse_ns_body",
            "EventHandler", "DebugEventHandler", "NetworkStatusEvent",
@@ -574,8 +572,8 @@
     """Send an authenticating secret to Tor.  You'll need to call this
        method before Tor can start.
     """
-    hexstr = binascii.b2a_hex(secret)
-    self.sendAndRecv("AUTHENTICATE %s\r\n"%hexstr)
+    #hexstr = binascii.b2a_hex(secret)
+    self.sendAndRecv("AUTHENTICATE \"%s\"\r\n"%secret)
 
   def get_option(self, name):
     """Get the value of the configuration option named 'name'.  To
@@ -842,7 +840,7 @@
       event = CircuitEvent(evtype, ident, status, path, reason, remote)
     elif evtype == "STREAM":
       #plog("DEBUG", "STREAM: "+body)
-      m = re.match(r"(\S+)\s+(\S+)\s+(\S+)\s+(\S+):(\d+)(\sREASON=\S+)?(\sREMOTE_REASON=\S+)?(\sSOURCE=\S+)?(\sSOURCE_ADDR=\S+)?", body) 
+      m = re.match(r"(\S+)\s+(\S+)\s+(\S+)\s+(\S+):(\d+)(\sREASON=\S+)?(\sREMOTE_REASON=\S+)?(\sSOURCE=\S+)?(\sSOURCE_ADDR=\S+)?", body)
       if not m:
         raise ProtocolError("STREAM event misformatted.")
       ident,status,circ,target_host,target_port,reason,remote,source,source_addr = m.groups()



More information about the tor-commits mailing list