bpo-37363: Add audit events for a range of modules (GH-14301)

(cherry picked from commit 60419a7e96)

Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
Miss Islington (bot) 2019-06-24 09:09:47 -07:00 committed by GitHub
parent 366dac99c0
commit 8763d43a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 165 additions and 18 deletions

View file

@ -16,6 +16,7 @@ Based on the J. Myers POP3 draft, Jan. 96
import errno
import re
import socket
import sys
try:
import ssl
@ -99,6 +100,7 @@ class POP3:
self.host = host
self.port = port
self._tls_established = False
sys.audit("poplib.POP3", self, host, port)
self.sock = self._create_socket(timeout)
self.file = self.sock.makefile('rb')
self._debugging = 0
@ -109,6 +111,7 @@ class POP3:
def _putline(self, line):
if self._debugging > 1: print('*put*', repr(line))
sys.audit("poplib.POP3.putline", self, line)
self.sock.sendall(line + CRLF)