Skip to content

Commit

Permalink
[3.8] bpo-32793: Fix a duplicate debug message in smtplib (pythonGH-1…
Browse files Browse the repository at this point in the history
…5341)

_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 <zspytz@gmail.com>
  • Loading branch information
ZackerySpytz authored and corona10 committed Oct 13, 2020
1 parent 33057c7 commit 6e84f16
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions Lib/smtplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ def connect(self, host='localhost', port=0, source_address=None):
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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a duplicated debug message when :meth:`smtplib.SMTP.connect` is called.

0 comments on commit 6e84f16

Please sign in to comment.