From: Laurent Arnoud Date: Sat, 25 Oct 2014 15:47:13 +0000 (+0200) Subject: tools/queue_rss.py: Fix author format X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=7e8d23d26f453ea964cbc6c5c1e2de7d3dae14e9;p=dak.git 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 --- 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 )