changeset 43170:a1801ee97840

py3: call SMTP.docmd() with an str Otherwise, this always returns (502, '5.5.2 Error: command not recognized').
author Denis Laxalde <denis@laxalde.org>
date Thu, 10 Oct 2019 21:05:34 +0200
parents 3941e7063d03
children 54b06bec8914
files mercurial/mail.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/mail.py	Thu Oct 10 21:00:13 2019 +0200
+++ b/mercurial/mail.py	Thu Oct 10 21:05:34 2019 +0200
@@ -52,7 +52,7 @@
         if not self.has_extn("starttls"):
             msg = b"STARTTLS extension not supported by server"
             raise smtplib.SMTPException(msg)
-        (resp, reply) = self.docmd(b"STARTTLS")
+        (resp, reply) = self.docmd("STARTTLS")
         if resp == 220:
             self.sock = sslutil.wrapsocket(
                 self.sock,