notify: force an exception wrapped by errors.Abort to bytestr
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 06 Jan 2023 00:04:46 -0500
changeset 49864 5f006f789373
parent 49863 92743e6d1a0c
child 49865 5392bf258049
notify: force an exception wrapped by errors.Abort to bytestr Flagged by PyCharm and pytype.
hgext/notify.py
--- a/hgext/notify.py	Thu Jan 05 19:53:02 2023 -0500
+++ b/hgext/notify.py	Fri Jan 06 00:04:46 2023 -0500
@@ -450,7 +450,7 @@
         try:
             msg = mail.parsebytes(data)
         except emailerrors.MessageParseError as inst:
-            raise error.Abort(inst)
+            raise error.Abort(stringutil.forcebytestr(inst))
 
         # store sender and subject
         sender = msg['From']