summaryrefslogtreecommitdiff
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-05-14 21:30:46 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2009-05-14 21:30:46 +0000
commit2ca24f022ed226cbe48012b5ea82da36025f33f2 (patch)
tree3e3a766a9d621b0682c54c7345917380bbf9c2e0 /Lib/nntplib.py
parent4210c6edcaf85ca2675c436a0992ab6e96f3d165 (diff)
downloadcpython-git-2ca24f022ed226cbe48012b5ea82da36025f33f2.tar.gz
Merged revisions 72640 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72640 | antoine.pitrou | 2009-05-14 23:22:08 +0200 (jeu., 14 mai 2009) | 5 lines Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. (Unfortunately, nntplib doesn't have a test suite) ........
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 4d7f9fd8cb..6ac2fcb994 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()