bpo-37390: Add audit event table to documentations (GH-14406)

Also updates some (unreleased) event names to be consistent with the others.
(cherry picked from commit 44f91c388a)

Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
Miss Islington (bot) 2019-06-27 11:07:16 -07:00 committed by GitHub
parent 60f24b23bf
commit 4fee28aa42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 266 additions and 113 deletions

View file

@ -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))