From: Filippo Giunchedi Date: Tue, 9 Dec 2008 22:16:03 +0000 (+0100) Subject: use python-debian for .changes parsing X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0708400a8775dc847856de8ccf4a9fa6e9d2863d;p=dak.git use python-debian for .changes parsing --- diff --git a/queue_rss.py b/queue_rss.py index 6e5c2407..c312b25b 100755 --- a/queue_rss.py +++ b/queue_rss.py @@ -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'])