mail: unbyteify the SMTPException message
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 01 Mar 2023 12:38:36 -0500
changeset 50377 174290adfc4a
parent 50376 1c7453f2bb57
child 50378 ebf1a07539b9
mail: unbyteify the SMTPException message This is a subclass of OSError, which wants str instead of bytes.
mercurial/mail.py
--- a/mercurial/mail.py	Wed Mar 01 12:37:05 2023 -0500
+++ b/mercurial/mail.py	Wed Mar 01 12:38:36 2023 -0500
@@ -56,7 +56,7 @@
 
     def starttls(self, keyfile=None, certfile=None, context=None):
         if not self.has_extn("starttls"):
-            msg = b"STARTTLS extension not supported by server"
+            msg = "STARTTLS extension not supported by server"
             raise smtplib.SMTPException(msg)
         (resp, reply) = self.docmd("STARTTLS")
         if resp == 220: