summaryrefslogtreecommitdiffstats
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-11-05 19:16:37 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-11-05 19:16:37 (GMT)
commita078115434c58b2dce4cec82f3c2a90711166d60 (patch)
tree32c7524089fd9e97c4f275c3cff7a6d0a63941d9 /Lib/nntplib.py
parent09fff7a8d185c5b87a979eefb94a2aa462b8a035 (diff)
downloadcpython-a078115434c58b2dce4cec82f3c2a90711166d60.zip
cpython-a078115434c58b2dce4cec82f3c2a90711166d60.tar.gz
cpython-a078115434c58b2dce4cec82f3c2a90711166d60.tar.bz2
Issue #10282: Add a `nntp_implementation` attribute to NNTP objects.
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index d5786e2..a09c065 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -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