minor patch for --tor

This commit is contained in:
Miroslav Stampar 2011-10-27 10:52:06 +00:00
parent 3c31ccd16e
commit 6b7920d89a
2 changed files with 4 additions and 1 deletions

View File

@ -404,6 +404,9 @@ Andres Riancho <andres.riancho@gmail.com>
Jamie Riden <jamie.riden@ngssecure.com> Jamie Riden <jamie.riden@ngssecure.com>
for reporting a minor bug for reporting a minor bug
Alexander Rigbo <alex@rigbo.se>
for contributing a minor patch
Antonio Riva <antonio.riva@gmail.com> Antonio Riva <antonio.riva@gmail.com>
for reporting a bug when running with python 2.5 for reporting a bug when running with python 2.5

View File

@ -1702,10 +1702,10 @@ def __setTorProxySettings():
logger.info(infoMsg) logger.info(infoMsg)
found = None found = None
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
for port in DEFAULT_TOR_PORTS: for port in DEFAULT_TOR_PORTS:
try: try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((LOCALHOST, port)) s.connect((LOCALHOST, port))
found = port found = port
break break