diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-25 06:30:05 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-25 06:30:05 (GMT) |
commit | 0d4c06e06e5ee1f3bb1fa8068114bd700d74864a (patch) | |
tree | 021c8e11696fc29a41ddd9e853af42e6008a58f6 /Lib/socket.py | |
parent | e47c508850392422ebbf15c86e7411b46addfcd0 (diff) | |
download | cpython-0d4c06e06e5ee1f3bb1fa8068114bd700d74864a.zip cpython-0d4c06e06e5ee1f3bb1fa8068114bd700d74864a.tar.gz cpython-0d4c06e06e5ee1f3bb1fa8068114bd700d74864a.tar.bz2 |
Whitespace normalization. Ugh, we really need to do this more often.
You might want to review this change as it's my first time. Be gentle. :-)
Diffstat (limited to 'Lib/socket.py')
-rw-r--r-- | Lib/socket.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index c03e884..4490fc4 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -24,7 +24,7 @@ inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89) ssl() -- secure socket layer support (only available if configured) socket.getdefaulttimeout() -- get the default timeout value socket.setdefaulttimeout() -- set the default timeout value -create_connection() -- connects to an address, with an optional timeout +create_connection() -- connects to an address, with an optional timeout [*] not available on all platforms! @@ -418,12 +418,12 @@ class _fileobject(object): def create_connection(address, timeout=None): """Connect to address (host, port) with an optional timeout. - Provides access to socketobject timeout for higher-level - protocols. Passing a timeout will set the timeout on the + Provides access to socketobject timeout for higher-level + protocols. Passing a timeout will set the timeout on the socket instance (if not present, or passed as None, the default global timeout setting will be used). """ - + msg = "getaddrinfo returns an empty list" host, port = address for res in getaddrinfo(host, port, 0, SOCK_STREAM): @@ -435,7 +435,7 @@ def create_connection(address, timeout=None): sock.settimeout(timeout) sock.connect(sa) return sock - + except error, msg: if sock is not None: sock.close() |