changeset 49946:5f006f789373

notify: force an exception wrapped by errors.Abort to bytestr Flagged by PyCharm and pytype.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 06 Jan 2023 00:04:46 -0500
parents 92743e6d1a0c
children 5392bf258049
files hgext/notify.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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']