summaryrefslogtreecommitdiffstats
path: root/Lib/imaplib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-05-15 11:50:29 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-05-15 11:50:29 (GMT)
commit52035a04abc8b75c1481064639150e4089cd80c7 (patch)
tree96241dc2fb699d15a94998eaeb5690b56ee3fe45 /Lib/imaplib.py
parent490096e7605aae03f59881923dacbea266746ad5 (diff)
downloadcpython-52035a04abc8b75c1481064639150e4089cd80c7.zip
cpython-52035a04abc8b75c1481064639150e4089cd80c7.tar.gz
cpython-52035a04abc8b75c1481064639150e4089cd80c7.tar.bz2
Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr.
Diffstat (limited to 'Lib/imaplib.py')
-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)