py3: call SMTP.docmd() with an str
authorDenis Laxalde <denis@laxalde.org>
Thu, 10 Oct 2019 21:05:34 +0200
changeset 43170 a1801ee97840
parent 43169 3941e7063d03
child 43171 54b06bec8914
py3: call SMTP.docmd() with an str Otherwise, this always returns (502, '5.5.2 Error: command not recognized').
mercurial/mail.py
--- 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,