mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #10282: Add a nntp_implementation attribute to NNTP objects.
This commit is contained in:
parent
09fff7a8d1
commit
a078115434
4 changed files with 41 additions and 12 deletions
|
|
@ -354,6 +354,7 @@ class _NNTPBase:
|
|||
|
||||
# Inquire about capabilities (RFC 3977)
|
||||
self.nntp_version = 1
|
||||
self.nntp_implementation = None
|
||||
try:
|
||||
resp, caps = self.capabilities()
|
||||
except NNTPPermanentError:
|
||||
|
|
@ -365,6 +366,8 @@ class _NNTPBase:
|
|||
# The server can advertise several supported versions,
|
||||
# choose the highest.
|
||||
self.nntp_version = max(map(int, caps['VERSION']))
|
||||
if 'IMPLEMENTATION' in caps:
|
||||
self.nntp_implementation = ' '.join(caps['IMPLEMENTATION'])
|
||||
|
||||
def getwelcome(self):
|
||||
"""Get the welcome message from the server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue