[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torflow/master] Update metatroller example to use new TorCtl.connect..
commit 07cbb7c90d1335043e7ce00d85102b18003ca1c9
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Sat Jun 25 10:39:03 2011 -0700
Update metatroller example to use new TorCtl.connect..
---
metatroller.py | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/metatroller.py b/metatroller.py
index dc6ff6c..3449249 100755
--- a/metatroller.py
+++ b/metatroller.py
@@ -305,11 +305,8 @@ def listenloop(c, h, f):
srv.close()
def startup():
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((control_host,control_port))
- c = PathSupport.Connection(s)
+ c = TorCtl.connect(control_host, control_port, ConnClass=PathSupport.Connection)
c.debug(file("control.log", "w", buffering=0))
- c.authenticate(control_pass)
h = PathSupport.PathBuilder(c, __selmgr) # StatsHandler(c, __selmgr)
c.set_event_handler(h)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits