diff options
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r-- | Lib/nntplib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py index 5961a28..e7bbc85 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -68,6 +68,7 @@ import socket import collections import datetime import warnings +import sys try: import ssl @@ -413,6 +414,7 @@ class _NNTPBase: def _putline(self, line): """Internal: send one line to the server, appending CRLF. The `line` must be a bytes-like object.""" + sys.audit("nntplib.NNTP.putline", self, line) line = line + _CRLF if self.debugging > 1: print('*put*', repr(line)) self.file.write(line) @@ -1040,6 +1042,7 @@ class NNTP(_NNTPBase): """ self.host = host self.port = port + sys.audit("nntplib.NNTP", self, host, port) self.sock = socket.create_connection((host, port), timeout) file = None try: @@ -1071,6 +1074,7 @@ if _have_ssl: """This works identically to NNTP.__init__, except for the change in default port and the `ssl_context` argument for SSL connections. """ + sys.audit("nntplib.NNTP", self, host, port) self.sock = socket.create_connection((host, port), timeout) file = None try: |