[dak/master] tools/queue_rss.py: Fix author format
see http://validator.w3.org/feed/docs/warning/EmailFormat.html
Signed-off-by: Laurent Arnoud <laurent@spkdev.net>
Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
tools/queue_rss.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/queue_rss.py b/tools/queue_rss.py
index da74a0d..fd49c0d 100755
--- a/tools/queue_rss.py
+++ b/tools/queue_rss.py
@@ -14,6 +14,7 @@ import sys
import time
from optparse import OptionParser
from datetime import datetime
+from email.utils import parseaddr
import PyRSS2Gen
@@ -141,12 +142,15 @@ def add_rss_item(status, msg, direction):
link = "https://ftp-master.debian.org/new/%s_%s.html" % \
(msg['Source'], msg['Version'])
+ maintainer = parseaddr(msg['Maintainer'])
+ author = "%s (%s)" % (maintainer[1], maintainer[0])
+
feed.items.insert(0,
PyRSS2Gen.RSSItem(
title,
pubDate = pubdate,
description = description,
- author = cgi.escape(msg['Maintainer']),
+ author = cgi.escape(author),
link = link,
guid = link
)
--
1.7.10.4
Reply to: