From 7e8d23d26f453ea964cbc6c5c1e2de7d3dae14e9 Mon Sep 17 00:00:00 2001 From: Laurent Arnoud Date: Sat, 25 Oct 2014 17:47:13 +0200 Subject: [PATCH] tools/queue_rss.py: Fix author format see http://validator.w3.org/feed/docs/warning/EmailFormat.html Signed-off-by: Laurent Arnoud Signed-off-by: Joerg Jaspert --- 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 da74a0df..fd49c0df 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 ) -- 2.39.5