[PATCH 2 of 4] py3: call SMTP.docmd() with an str
Denis Laxalde
denis at laxalde.org
Thu Oct 10 15:47:29 EDT 2019
# HG changeset patch
# User Denis Laxalde <denis at laxalde.org>
# Date 1570734334 -7200
# Thu Oct 10 21:05:34 2019 +0200
# Node ID 134382b8c782147ab2fab155ebe79aa8df3b435c
# Parent 55a0f0c84fdc2170047ea99f71bfac60e3ea4b50
py3: call SMTP.docmd() with an str
Otherwise, this always returns (502, '5.5.2 Error: command not
recognized').
diff --git a/mercurial/mail.py b/mercurial/mail.py
index 675207a..519cc3b 100644
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -52,7 +52,7 @@ class STARTTLS(smtplib.SMTP):
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,
More information about the Mercurial-devel
mailing list