[Pkg-privacy-commits] [txtorcon] 24/49: comments and naming-style

Ximin Luo infinity0 at debian.org
Mon Oct 19 13:49:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository txtorcon.

commit c211a56493b94f2c1f7aaee1ab4b9238aa2eccc4
Author: meejah <meejah at meejah.ca>
Date:   Fri Jun 19 16:36:28 2015 -0600

    comments and naming-style
---
 txtorcon/endpoints.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/txtorcon/endpoints.py b/txtorcon/endpoints.py
index 583d608..070e7e8 100644
--- a/txtorcon/endpoints.py
+++ b/txtorcon/endpoints.py
@@ -611,6 +611,8 @@ class TorClientEndpoint(object):
        This optional argument lets the user specify which Tor SOCKS
        port should be used.
     """
+    # XXX should get these via the control connection, i.e. ask Tor
+    # via GETINFO net/listeners/socks or whatever
     socks_ports_to_try = [9050, 9150]
 
     def __init__(self, host, port,
@@ -629,7 +631,7 @@ class TorClientEndpoint(object):
         self.socks_password = socks_password
 
         if self.socks_port is None:
-            self.socks_portIter = iter(self.socks_ports_to_try)
+            self.socks_port_iter = iter(self.socks_ports_to_try)
             self.socksGuessingEnabled = True
         else:
             self.socksGuessingEnabled = False
@@ -638,7 +640,7 @@ class TorClientEndpoint(object):
         self.protocolfactory = protocolfactory
 
         if self.socksGuessingEnabled:
-            self.socks_port = self.socks_portIter.next()
+            self.socks_port = self.socks_port_iter.next()
 
         d = self._try_connect()
         return d
@@ -672,7 +674,7 @@ class TorClientEndpoint(object):
     def _retry_socks_port(self, failure):
         failure.trap(error.ConnectError)
         try:
-            self.socks_port = self.socks_portIter.next()
+            self.socks_port = self.socks_port_iter.next()
         except StopIteration:
             return failure
         d = self._try_connect()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/txtorcon.git



More information about the Pkg-privacy-commits mailing list