Skip to content

Commit 76b1913

Browse files
[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 46a7564) Co-authored-by: Zackery Spytz <[email protected]> Co-authored-by: Zackery Spytz <[email protected]>
1 parent 33057c7 commit 76b1913

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Lib/smtplib.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,6 @@ def connect(self, host='localhost', port=0, source_address=None):
333333
raise OSError("nonnumeric port")
334334
if not port:
335335
port = self.default_port
336-
if self.debuglevel > 0:
337-
self._print_debug('connect:', (host, port))
338336
sys.audit("smtplib.connect", self, host, port)
339337
self.sock = self._get_socket(host, port, self.timeout)
340338
self.file = None
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a duplicated debug message when :meth:`smtplib.SMTP.connect` is called.

0 commit comments

Comments
 (0)