]> git.decadent.org.uk Git - dak.git/commitdiff
tools/queue_rss.py: Fix author format
authorLaurent Arnoud <laurent@spkdev.net>
Sat, 25 Oct 2014 15:47:13 +0000 (17:47 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sat, 6 Dec 2014 12:48:59 +0000 (13:48 +0100)
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

index da74a0dfae7a1b45bb5d8c4f4478945ffd2d4bb6..fd49c0dfe1f0173a7c0fd343e7ed37a1af5cd9bc 100755 (executable)
@@ -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
         )