_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>
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
--- /dev/null
+Fix a duplicated debug message when :meth:`smtplib.SMTP.connect` is called.