mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #10280: NNTP.nntp_version should reflect the highest version
advertised by the server.
This commit is contained in:
parent
e159422ce9
commit
f80b3f72c6
3 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue