mail: force SMTPException to bytes before wrapping in error.Abort
Pytype wasn't complaining about this for some reason, but PyCharm was and we
already handle another instance of this exception the same way in this function.
Differential Revision: https://phab.mercurial-scm.org/D10473
--- a/mercurial/mail.py Mon Apr 19 17:26:57 2021 -0400
+++ b/mercurial/mail.py Mon Apr 19 20:38:52 2021 -0400
@@ -164,7 +164,7 @@
recipients = [r[1] for r in inst.recipients.values()]
raise error.Abort(b'\n' + b'\n'.join(recipients))
except smtplib.SMTPException as inst:
- raise error.Abort(inst)
+ raise error.Abort(stringutil.forcebytestr(inst))
return send