hgext/notify.py
branchstable
changeset 43326 ef81de93143e
parent 43322 7d912413a3ae
child 43327 ac33550f63e8
--- a/hgext/notify.py	Thu Oct 24 17:16:43 2019 +0200
+++ b/hgext/notify.py	Thu Oct 24 15:28:00 2019 +0200
@@ -148,7 +148,6 @@
 from __future__ import absolute_import
 
 import email.errors as emailerrors
-import email.parser as emailparser
 import fnmatch
 import hashlib
 import socket
@@ -382,9 +381,8 @@
             )
             return
 
-        p = emailparser.Parser()
         try:
-            msg = p.parsestr(encoding.strfromlocal(data))
+            msg = mail.parsebytes(data)
         except emailerrors.MessageParseError as inst:
             raise error.Abort(inst)