changeset 50377:174290adfc4a

mail: unbyteify the SMTPException message This is a subclass of OSError, which wants str instead of bytes.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 01 Mar 2023 12:38:36 -0500
parents 1c7453f2bb57
children ebf1a07539b9
files mercurial/mail.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: