summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-05-15 12:03:56 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-05-15 12:03:56 (GMT)
commitfe8fb46ad349b1df7b7a3e8dff60eade9e3b266b (patch)
tree3f327b4a8b16fc6903dd0715c036d4bfe5727457 /Lib
parent250bf34b852ef30d784e4d64c3c655d3da9bb9b0 (diff)
downloadcpython-fe8fb46ad349b1df7b7a3e8dff60eade9e3b266b.zip
cpython-fe8fb46ad349b1df7b7a3e8dff60eade9e3b266b.tar.gz
cpython-fe8fb46ad349b1df7b7a3e8dff60eade9e3b266b.tar.bz2
Merged revisions 72662 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72662 | antoine.pitrou | 2009-05-15 13:50:29 +0200 (ven., 15 mai 2009) | 3 lines Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/imaplib.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 7807e8f..f13350e 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -226,8 +226,7 @@ class IMAP4:
"""
self.host = host
self.port = port
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect((host, port))
+ self.sock = socket.create_connection((host, port))
self.file = self.sock.makefile('rb')
@@ -1145,8 +1144,7 @@ else:
"""
self.host = host
self.port = port
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect((host, port))
+ self.sock = socket.create_connection((host, port))
self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile)