summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorFacundo Batista <facundobatista@gmail.com>2008-05-29 16:39:26 (GMT)
committerFacundo Batista <facundobatista@gmail.com>2008-05-29 16:39:26 (GMT)
commit4f1b1ed975fe25170d00559e63f992c9bf8e9b8a (patch)
tree0f2a0434dc9ad0181633f649611e417aa4a6ea61 /Lib/urllib.py
parentf18a70720542268586e271bbadab3fb0332b8a39 (diff)
downloadcpython-4f1b1ed975fe25170d00559e63f992c9bf8e9b8a.zip
cpython-4f1b1ed975fe25170d00559e63f992c9bf8e9b8a.tar.gz
cpython-4f1b1ed975fe25170d00559e63f992c9bf8e9b8a.tar.bz2
Fixed the semantic of timeout for socket.create_connection and
all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :)
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index bf5fc97..ab22a95 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -832,7 +832,8 @@ def noheaders():
class ftpwrapper:
"""Class used by open_ftp() for cache of open FTP connections."""
- def __init__(self, user, passwd, host, port, dirs, timeout=None):
+ def __init__(self, user, passwd, host, port, dirs,
+ timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
self.user = user
self.passwd = passwd
self.host = host