]> git.decadent.org.uk Git - dak.git/commitdiff
use python-debian for .changes parsing
authorFilippo Giunchedi <filippo@esaurito.net>
Tue, 9 Dec 2008 22:16:03 +0000 (23:16 +0100)
committerFilippo Giunchedi <filippo@esaurito.net>
Tue, 9 Dec 2008 22:16:03 +0000 (23:16 +0100)
queue_rss.py

index 6e5c240721e3fe73f84866861877fce4b7c2bb09..c312b25b64d9c67c438ab000c5a9a887df2aa3ff 100755 (executable)
@@ -15,6 +15,8 @@ from optparse import OptionParser
 
 import PyRSS2Gen
 
+from debian_bundle.deb822 import Changes
+
 inrss_filename = "changes_in.rss"
 outrss_filename = "changes_out.rss"
 db_filename = "status.db"
@@ -66,12 +68,7 @@ def parse_changes(fname):
 
     Return {fname: parsed} """
 
-    p = HeaderParser()
-
-    try:
-        m = p.parse(open(fname), True)
-    except IOError:
-        sys.stderr.write("Unable to parse %s\n" % fname)
+    m = Changes(open(fname))
 
     wanted_fields = set(['Source', 'Version', 'Architecture', 'Distribution',
                          'Date', 'Maintainer', 'Description', 'Changes'])