# HG changeset patch # User Augie Fackler # Date 2018-08-09 21:44:36 # Node ID 713126389ef230ad8d4149da5d2af021b9688d38 # Parent 8919cc4f63b4dd6ef4469f352e080bbea612fc1b mail: fix debug print, which appears to have been broken for a long time I noticed this when trying to debug very mysterious dummysmtpd problems. It turns out you can set self.debuglevel to a number greater than 0 and have smtplib print helpful debug output, but this output on our side of things was broken. Differential Revision: https://phab.mercurial-scm.org/D4218 diff --git a/mercurial/mail.py b/mercurial/mail.py --- a/mercurial/mail.py +++ b/mercurial/mail.py @@ -73,7 +73,7 @@ class SMTPS(smtplib.SMTP): def _get_socket(self, host, port, timeout): if self.debuglevel > 0: - self._ui.debug('connect: %r\n' % (host, port)) + self._ui.debug('connect: %r\n' % ((host, port),)) new_socket = socket.create_connection((host, port), timeout) new_socket = sslutil.wrapsocket(new_socket, self.keyfile, self.certfile,