summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-10-13 15:18:58 (GMT)
committerGitHub <noreply@github.com>2020-10-13 15:18:58 (GMT)
commit76b1913daf883b6592815d139f62f3a7fbe3c322 (patch)
treee639bd24b34429daad1a48ea0e27e2477bd3ae24
parent33057c70920787627f2c94d08eb5d33c31f8bdd9 (diff)
downloadcpython-76b1913daf883b6592815d139f62f3a7fbe3c322.zip
cpython-76b1913daf883b6592815d139f62f3a7fbe3c322.tar.gz
cpython-76b1913daf883b6592815d139f62f3a7fbe3c322.tar.bz2
[3.8] bpo-32793: Fix a duplicate debug message in smtplib (GH-15341) (GH-22683)
_get_socket() already prints a debug message for the host and port. https://bugs.python.org/issue32793 Automerge-Triggered-By: @maxking (cherry picked from commit 46a7564578f208df1e0c54fc0520d3b7ca32c981) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Zackery Spytz <zspytz@gmail.com>
-rwxr-xr-xLib/smtplib.py2
-rw-r--r--Misc/NEWS.d/next/Library/2019-08-20-05-17-32.bpo-32793.cgpXl6.rst1
2 files changed, 1 insertions, 2 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 8e3d4bf..6513842e 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -333,8 +333,6 @@ class SMTP:
raise OSError("nonnumeric port")
if not port:
port = self.default_port
- if self.debuglevel > 0:
- self._print_debug('connect:', (host, port))
sys.audit("smtplib.connect", self, host, port)
self.sock = self._get_socket(host, port, self.timeout)
self.file = None
diff --git a/Misc/NEWS.d/next/Library/2019-08-20-05-17-32.bpo-32793.cgpXl6.rst b/Misc/NEWS.d/next/Library/2019-08-20-05-17-32.bpo-32793.cgpXl6.rst
new file mode 100644
index 0000000..f715a81
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-08-20-05-17-32.bpo-32793.cgpXl6.rst
@@ -0,0 +1 @@
+Fix a duplicated debug message when :meth:`smtplib.SMTP.connect` is called.