]> git.decadent.org.uk Git - dak.git/blobdiff - tools/queue_rss.py
tools/queue_rss.py: Fix author format
[dak.git] / 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
         )