summaryrefslogtreecommitdiff
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-11-02 22:31:52 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2010-11-02 22:31:52 +0000
commitf80b3f72c6c486207deeda259579cba2a28bde93 (patch)
tree563c01636238b8ce59875640d21a0f3d008d30e4 /Lib/nntplib.py
parente159422ce9cd6cedff7b45eef5a00d7e6a2aa90c (diff)
downloadcpython-git-f80b3f72c6c486207deeda259579cba2a28bde93.tar.gz
Issue #10280: NNTP.nntp_version should reflect the highest version
advertised by the server.
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 409342c78c..b067d6b3df 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -361,7 +361,9 @@ class _NNTPBase:
else:
self._caps = caps
if 'VERSION' in caps:
- self.nntp_version = int(caps['VERSION'][0])
+ # The server can advertise several supported versions,
+ # choose the highest.
+ self.nntp_version = max(map(int, caps['VERSION']))
def getwelcome(self):
"""Get the welcome message from the server