summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-05-14 21:22:08 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-05-14 21:22:08 (GMT)
commiteed30d830b26d325d04630cd5ee3af22f4d234da (patch)
treedb4d84a79eb7f98e844cc85f21f0c1126f7c148b /Lib
parentcbb4f9ef58ec7673f7c64b16496879b914b0972a (diff)
downloadcpython-eed30d830b26d325d04630cd5ee3af22f4d234da.zip
cpython-eed30d830b26d325d04630cd5ee3af22f4d234da.tar.gz
cpython-eed30d830b26d325d04630cd5ee3af22f4d234da.tar.bz2
Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
(Unfortunately, nntplib doesn't have a test suite)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/nntplib.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index cc51d1d..f519b06 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -109,8 +109,7 @@ class NNTP:
"""
self.host = host
self.port = port
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect((self.host, self.port))
+ self.sock = socket.create_connection((host, port))
self.file = self.sock.makefile('rb')
self.debugging = 0
self.welcome = self.getresp()