hgext/notify.py
changeset 49288 ef5f5f1cbd90
parent 48946 642e31cb55f0
child 49864 5f006f789373
--- a/hgext/notify.py	Sun May 29 15:38:01 2022 +0200
+++ b/hgext/notify.py	Tue May 31 00:50:29 2022 +0200
@@ -465,7 +465,7 @@
             # create fresh mime message from scratch
             # (multipart templates must take care of this themselves)
             headers = msg.items()
-            payload = msg.get_payload(decode=pycompat.ispy3)
+            payload = msg.get_payload(decode=True)
             # for notification prefer readability over data precision
             msg = mail.mimeencode(self.ui, payload, self.charsets, self.test)
             # reinstate custom headers
@@ -524,7 +524,7 @@
                 )
         msg['To'] = ', '.join(sorted(subs))
 
-        msgtext = msg.as_bytes() if pycompat.ispy3 else msg.as_string()
+        msgtext = msg.as_bytes()
         if self.test:
             self.ui.write(msgtext)
             if not msgtext.endswith(b'\n'):