diff --git a/net/py-rt/Makefile b/net/py-rt/Makefile index c1dbb9cbd92d..5b1315949985 100644 --- a/net/py-rt/Makefile +++ b/net/py-rt/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2018/09/15 10:53:31 leot Exp $ +# $NetBSD: Makefile,v 1.2 2019/06/09 13:57:27 leot Exp $ DISTNAME= rt-1.0.11 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +PKGREVISION= 1 CATEGORIES= net python MASTER_SITES= ${MASTER_SITE_PYPI:=r/rt/} diff --git a/net/py-rt/distinfo b/net/py-rt/distinfo index ffc2883b4c58..dc3dbc0cc9eb 100644 --- a/net/py-rt/distinfo +++ b/net/py-rt/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.1 2018/09/15 10:53:31 leot Exp $ +$NetBSD: distinfo,v 1.2 2019/06/09 13:57:27 leot Exp $ SHA1 (py-rt/rt-1.0.11.tar.gz) = 2a919c9df7a7aec75aa9f1f19df9fbc81341e784 RMD160 (py-rt/rt-1.0.11.tar.gz) = cd0ee2929ede3c878e21bf0750e4fe262550ded5 SHA512 (py-rt/rt-1.0.11.tar.gz) = 00007710d152472bf25e656b6298502e0b571932c8c3f4c498074fe7a849d575fd2deaad91a4814a7aece4dbfa847c913045e927830a8e0a02d3d13876562696 Size (py-rt/rt-1.0.11.tar.gz) = 35084 bytes +SHA1 (patch-rt.py) = a1180f06f39e1dba6fca86205755549c34d6b8b8 diff --git a/net/py-rt/patches/patch-rt.py b/net/py-rt/patches/patch-rt.py new file mode 100644 index 000000000000..701b8a9001c2 --- /dev/null +++ b/net/py-rt/patches/patch-rt.py @@ -0,0 +1,29 @@ +$NetBSD: patch-rt.py,v 1.1 2019/06/09 13:57:27 leot Exp $ + +Backport upstream commit bb07009c4f62dd2ac393aab82fded6424eead82f +to ignore ignore possible empty lines. + +--- rt.py.orig 2018-07-16 12:47:27.000000000 +0000 ++++ rt.py +@@ -518,15 +518,19 @@ class Rt: + return items + elif Format == 's': + items = [] +- msgs = msg.splitlines()[2:] ++ msgs = lines[2:] + for msg in msgs: ++ if "" == msg: # Ignore blank line at the end ++ continue + ticket_id, subject = msg.split(': ', 1) + items.append({'id': 'ticket/' + ticket_id, 'Subject': subject}) + return items + elif Format == 'i': + items = [] +- msgs = msg.splitlines()[2:] ++ msgs = lines[2:] + for msg in msgs: ++ if "" == msg: # Ignore blank line at the end ++ continue + _, ticket_id = msg.split('/', 1) + items.append({'id': 'ticket/' + ticket_id}) + return items