aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-06-24 08:42:54 -0700
committerGitHub <noreply@github.com>2019-06-24 08:42:54 -0700
commit60419a7e96577cf783b3b45bf3984f9fb0d7ddff (patch)
tree2718cb915663c42902621491ba60accce6729d42 /Lib/poplib.py
parentbpo-37359: Fix regrtest --cleanup (GH-14336) (diff)
downloadcpython-60419a7e96577cf783b3b45bf3984f9fb0d7ddff.tar.gz
cpython-60419a7e96577cf783b3b45bf3984f9fb0d7ddff.tar.bz2
cpython-60419a7e96577cf783b3b45bf3984f9fb0d7ddff.zip
bpo-37363: Add audit events for a range of modules (GH-14301)
Diffstat (limited to 'Lib/poplib.py')
-rw-r--r--Lib/poplib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/poplib.py b/Lib/poplib.py
index 9796f0d2f9c..ced0a2d53c5 100644
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -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)