bpo-32793: Fix a duplicate debug message in smtplib (GH-15341)

_get_socket() already prints a debug message for the host and port.



https://bugs.python.org/issue32793



Automerge-Triggered-By: @maxking
This commit is contained in:
Zackery Spytz 2019-08-20 11:52:25 -06:00 committed by Miss Islington (bot)
parent 9e66aba999
commit 46a7564578
2 changed files with 1 additions and 2 deletions

View File

@ -333,8 +333,6 @@ class SMTP:
raise OSError("nonnumeric port") raise OSError("nonnumeric port")
if not port: if not port:
port = self.default_port port = self.default_port
if self.debuglevel > 0:
self._print_debug('connect:', (host, port))
sys.audit("smtplib.connect", self, host, port) sys.audit("smtplib.connect", self, host, port)
self.sock = self._get_socket(host, port, self.timeout) self.sock = self._get_socket(host, port, self.timeout)
self.file = None self.file = None

View File

@ -0,0 +1 @@
Fix a duplicated debug message when :meth:`smtplib.SMTP.connect` is called.