--- 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'):