[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#312222: [jennifer] Don't fall over on broken syntax in .changes:Maintainer



Package: dak
Tags: upstream patch

Hi,

This patch should fix jennifer falling over on broken syntax in .changes
files, and instead just reject.

Changelog: (jennifer) Add missing exception handling for maintainer
field parsing

Note: I couldn't test this on the offending file because I can't read
anything but the .changes.

--- /org/ftp.debian.org/katie/jennifer	Tue May 31 07:22:52 2005
+++ jennifer	Mon Jun  6 08:16:16 2005
@@ -1031,7 +1031,12 @@
     if not changes.has_key("distribution") or not isinstance(changes["distribution"], DictType):
         changes["distribution"] = {};
 
-    (summary, short_summary) = Katie.build_summaries();
+    try:
+        (summary, short_summary) = Katie.build_summaries();
+    except ParseMaintError, msg:
+        # should be already rejected earlier on, just make sure
+        reject("%s: Maintainer field ('%s') failed to parse: %s" \
+               % (filename, changes["maintainer"], msg));
 
     byhand = new = "";
     for file in files.keys():

--Jeroen

-- 
Jeroen van Wolffelaar
Jeroen@wolffelaar.nl (also for Jabber & MSN; ICQ: 33944357)
http://Jeroen.A-Eskwadraat.nl




Reply to: