pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/py-flask-sendmail py-flask-sendmail: fix sending m...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0a0c6fcba84c
branches:  trunk
changeset: 457864:0a0c6fcba84c
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Fri Sep 03 14:38:50 2021 +0000

description:
py-flask-sendmail: fix sending messages

Bumps PKGREVISION.

diffstat:

 www/py-flask-sendmail/Makefile                                 |   4 +-
 www/py-flask-sendmail/distinfo                                 |   4 +-
 www/py-flask-sendmail/patches/patch-flask__sendmail_message.py |  13 ++++++---
 3 files changed, 13 insertions(+), 8 deletions(-)

diffs (61 lines):

diff -r 62d43fbe8cb6 -r 0a0c6fcba84c www/py-flask-sendmail/Makefile
--- a/www/py-flask-sendmail/Makefile    Fri Sep 03 12:06:05 2021 +0000
+++ b/www/py-flask-sendmail/Makefile    Fri Sep 03 14:38:50 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2021/06/02 21:06:03 khorben Exp $
+# $NetBSD: Makefile,v 1.3 2021/09/03 14:38:50 khorben Exp $
 
 DISTNAME=      Flask-Sendmail-0.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:tl}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    www python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=F/Flask-Sendmail/}
 
diff -r 62d43fbe8cb6 -r 0a0c6fcba84c www/py-flask-sendmail/distinfo
--- a/www/py-flask-sendmail/distinfo    Fri Sep 03 12:06:05 2021 +0000
+++ b/www/py-flask-sendmail/distinfo    Fri Sep 03 14:38:50 2021 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.2 2021/06/02 21:06:03 khorben Exp $
+$NetBSD: distinfo,v 1.3 2021/09/03 14:38:50 khorben Exp $
 
 SHA1 (Flask-Sendmail-0.1.tar.gz) = 6ac44c275a3d9dce4ed3d028335537ed19e67cef
 RMD160 (Flask-Sendmail-0.1.tar.gz) = 7b79b89250b9376ff5f9f2f1d1b3b0508c861a6a
 SHA512 (Flask-Sendmail-0.1.tar.gz) = c341d841a5ea2ff06d60361bf323fd3d9bce1b332143da415534e9176d797fbd5bd59ea9b7563a81e35dbe93dcbb6d957f02df61bd191b385eb834638133aecd
 Size (Flask-Sendmail-0.1.tar.gz) = 3410 bytes
 SHA1 (patch-flask__sendmail_connection.py) = bcc2161f5f1d5bcaa67a67b319554e3d41ee0e97
-SHA1 (patch-flask__sendmail_message.py) = 7aa1f56237e7ae3704eb98060dded53222ed29a1
+SHA1 (patch-flask__sendmail_message.py) = 5a4971be87c7f043d0adc3844df658fc0daf254f
diff -r 62d43fbe8cb6 -r 0a0c6fcba84c www/py-flask-sendmail/patches/patch-flask__sendmail_message.py
--- a/www/py-flask-sendmail/patches/patch-flask__sendmail_message.py    Fri Sep 03 12:06:05 2021 +0000
+++ b/www/py-flask-sendmail/patches/patch-flask__sendmail_message.py    Fri Sep 03 14:38:50 2021 +0000
@@ -1,20 +1,25 @@
-$NetBSD: patch-flask__sendmail_message.py,v 1.1 2021/06/02 21:06:03 khorben Exp $
+$NetBSD: patch-flask__sendmail_message.py,v 1.2 2021/09/03 14:38:50 khorben Exp $
 
 Fix for Python 3
 
 From commit cc55636201554d1cf8516bb5bf0326bb498d03a7 in the flask-sendmail-ng
 fork at https://github.com/ncrocfer/flask-sendmail-ng.
 
---- flask_sendmail/message.py.orig        2012-04-23 02:41:10.000000000 +0000
+--- flask_sendmail/message.py.orig     2012-04-23 02:41:10.000000000 +0000
 +++ flask_sendmail/message.py
-@@ -99,7 +99,11 @@ class Message(object):
+@@ -1,3 +1,4 @@
++import sys
+ from email.mime.text import MIMEText
+ 
+ try:
+@@ -99,7 +100,11 @@ class Message(object):
          if self.reply_to:
              msg['Reply-To'] = self.reply_to
  
 -        return msg.as_string()
 +        msg_str = msg.as_string()
 +        if sys.version_info >= (3,0) and isinstance(msg_str, str):
-+            return msg_str.encode(self.charset or 'utf-8')
++            return msg_str.encode(getattr(self, 'charset', 'utf-8'))
 +        else:
 +            return msg_str
  



Home | Main Index | Thread Index | Old Index