Issue #10280: NNTP.nntp_version should reflect the highest version
advertised by the server.
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 409342c..b067d6b 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -361,7 +361,9 @@
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