patch was unnecessary. kept docstrings.

This commit is contained in:
connelly
2004-07-31 10:45:47 +00:00
committed by zzz
parent a05e8a446d
commit 823f4a26b3

View File

@ -238,20 +238,19 @@ class Socket:
pass
self.closed = True
def connect(self, address, **kw):
def connect(self, address):
"""
Attempts to connect to a remote dest, identified in local
SAM bridge's hosts file as host 'address'.
Connect to a remote dest, identified in local SAM bridge's hosts
file as host 'address'.
For example:
s.connect("duck.i2p")
s.connect('duck.i2p')
You can pass a keyword 'dontResolve', which if true,
allows you to pass the base64 destination as the address, and
override the hostname lookup.
Alternatively, you can use a full base64 Destination:
For example:
s.connect("238797sdfh2k34kjh....AAAA")
s.connect('238797sdfh2k34kjh....AAAA')
"""
# Synchronized. Lock prevents two connects from occurring at the
# same time in different threads.
@ -264,10 +263,7 @@ class Socket:
self._verify_not_connected()
# patched by aum - allow caller to pass in raw base64 dest,
# and prevent the name lookup attempt
if not kw.get('dontResolve', 1):
address = resolve(address, self.samaddr)
address = resolve(address, self.samaddr)
timeout = self.timeout
unwrap = self.sessobj.connect(address, timeout=timeout)