diff options
author | Steve Dower <steve.dower@python.org> | 2019-06-27 17:47:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 17:47:59 (GMT) |
commit | 44f91c388a6f4da9ed3300df32ca290b8aa104ea (patch) | |
tree | 6e02d501dbcb28708fa662a33da2715a505389e5 /Lib | |
parent | 21cfae107e410bf4b0ab3c142ca4449bc33290f5 (diff) | |
download | cpython-44f91c388a6f4da9ed3300df32ca290b8aa104ea.zip cpython-44f91c388a6f4da9ed3300df32ca290b8aa104ea.tar.gz cpython-44f91c388a6f4da9ed3300df32ca290b8aa104ea.tar.bz2 |
bpo-37390: Add audit event table to documentations (GH-14406)
Also updates some (unreleased) event names to be consistent with the others.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ftplib.py | 4 | ||||
-rw-r--r-- | Lib/imaplib.py | 4 | ||||
-rw-r--r-- | Lib/nntplib.py | 6 | ||||
-rw-r--r-- | Lib/poplib.py | 4 | ||||
-rwxr-xr-x | Lib/smtplib.py | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 27bf6da..58a46bc 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -148,7 +148,7 @@ class FTP: self.timeout = timeout if source_address is not None: self.source_address = source_address - sys.audit("ftplib.FTP.connect", self, self.host, self.port) + sys.audit("ftplib.connect", self, self.host, self.port) self.sock = socket.create_connection((self.host, self.port), self.timeout, source_address=self.source_address) self.af = self.sock.family @@ -189,7 +189,7 @@ class FTP: def putline(self, line): if '\r' in line or '\n' in line: raise ValueError('an illegal newline character should not be contained') - sys.audit("ftplib.FTP.sendcmd", self, line) + sys.audit("ftplib.sendcmd", self, line) line = line + CRLF if self.debugging > 1: print('*put*', self.sanitize(line)) diff --git a/Lib/imaplib.py b/Lib/imaplib.py index face45b..822d9d6 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -289,7 +289,7 @@ class IMAP4: # (which is used by socket.create_connection()) expects None # as a default value for host. host = None if not self.host else self.host - sys.audit("imaplib.IMAP4.open", self, self.host, self.port) + sys.audit("imaplib.open", self, self.host, self.port) return socket.create_connection((host, self.port)) def open(self, host = '', port = IMAP4_PORT): @@ -319,7 +319,7 @@ class IMAP4: def send(self, data): """Send data to remote.""" - sys.audit("imaplib.IMAP4.send", self, data) + sys.audit("imaplib.send", self, data) self.sock.sendall(data) diff --git a/Lib/nntplib.py b/Lib/nntplib.py index e7bbc85..1b7e83a 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -414,7 +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) + sys.audit("nntplib.putline", self, line) line = line + _CRLF if self.debugging > 1: print('*put*', repr(line)) self.file.write(line) @@ -1042,7 +1042,7 @@ class NNTP(_NNTPBase): """ self.host = host self.port = port - sys.audit("nntplib.NNTP", self, host, port) + sys.audit("nntplib.connect", self, host, port) self.sock = socket.create_connection((host, port), timeout) file = None try: @@ -1074,7 +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) + sys.audit("nntplib.connect", self, host, port) self.sock = socket.create_connection((host, port), timeout) file = None try: diff --git a/Lib/poplib.py b/Lib/poplib.py index ced0a2d..e3bd2ab 100644 --- a/Lib/poplib.py +++ b/Lib/poplib.py @@ -100,7 +100,7 @@ class POP3: self.host = host self.port = port self._tls_established = False - sys.audit("poplib.POP3", self, host, port) + sys.audit("poplib.connect", self, host, port) self.sock = self._create_socket(timeout) self.file = self.sock.makefile('rb') self._debugging = 0 @@ -111,7 +111,7 @@ class POP3: def _putline(self, line): if self._debugging > 1: print('*put*', repr(line)) - sys.audit("poplib.POP3.putline", self, line) + sys.audit("poplib.putline", self, line) self.sock.sendall(line + CRLF) diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 01f3d43..a634f7a 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -335,7 +335,7 @@ class SMTP: port = self.default_port if self.debuglevel > 0: self._print_debug('connect:', (host, port)) - sys.audit("smtplib.SMTP.connect", self, host, port) + sys.audit("smtplib.connect", self, host, port) self.sock = self._get_socket(host, port, self.timeout) self.file = None (code, msg) = self.getreply() @@ -353,7 +353,7 @@ class SMTP: # should not be used, but 'data' needs to convert the string to # binary itself anyway, so that's not a problem. s = s.encode(self.command_encoding) - sys.audit("smtplib.SMTP.send", self, s) + sys.audit("smtplib.send", self, s) try: self.sock.sendall(s) except OSError: |