Mercurial > hg
changeset 43169:3941e7063d03
py3: call SMTP.has_extn() with an str
Passing a bytes on Python 3 always returns False, thus starttls is not
properly detected.
author | Denis Laxalde <denis@laxalde.org> |
---|---|
date | Thu, 10 Oct 2019 21:00:13 +0200 |
parents | 01e8eefd9434 |
children | a1801ee97840 |
files | mercurial/mail.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py Thu Oct 10 20:27:34 2019 +0200 +++ b/mercurial/mail.py Thu Oct 10 21:00:13 2019 +0200 @@ -49,7 +49,7 @@ self._host = host def starttls(self, keyfile=None, certfile=None): - if not self.has_extn(b"starttls"): + if not self.has_extn("starttls"): msg = b"STARTTLS extension not supported by server" raise smtplib.SMTPException(msg) (resp, reply) = self.docmd(b"STARTTLS")