From 0d010f52896222de24d4403f37829ba73db8db90 Mon Sep 17 00:00:00 2001 From: Mike O'Connor Date: Fri, 13 Mar 2009 12:38:05 -0400 Subject: [PATCH] fail on first error in valid_deb Signed-off-by: Mike O'Connor --- daklib/binary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daklib/binary.py b/daklib/binary.py index 484c68c3..a079763b 100755 --- a/daklib/binary.py +++ b/daklib/binary.py @@ -142,10 +142,10 @@ class Binary(object): if self.chunks[0] != "debian-binary": rejected = True self.reject("%s: first chunk is '%s', expected 'debian-binary'." % (self.filename, self.chunks[0])) - if self.chunks[1] != "control.tar.gz": + if not rejected and self.chunks[1] != "control.tar.gz": rejected = True self.reject("%s: second chunk is '%s', expected 'control.tar.gz'." % (self.filename, self.chunks[1])) - if self.chunks[2] not in [ "data.tar.bz2", "data.tar.gz" ]: + if not rejected and self.chunks[2] not in [ "data.tar.bz2", "data.tar.gz" ]: rejected = True self.reject("%s: third chunk is '%s', expected 'data.tar.gz' or 'data.tar.bz2'." % (self.filename, self.chunks[2])) -- 2.39.5