]> git.decadent.org.uk Git - dak.git/commitdiff
fail on first error in valid_deb
authorMike O'Connor <stew@vireo.org>
Fri, 13 Mar 2009 16:38:05 +0000 (12:38 -0400)
committerMike O'Connor <stew@vireo.org>
Fri, 13 Mar 2009 16:38:05 +0000 (12:38 -0400)
Signed-off-by: Mike O'Connor <stew@vireo.org>
daklib/binary.py

index 484c68c345efa90117a3caa760a4f459329a5cd9..a079763b45dc63b0d52ac71aff38c26ca7eed82b 100755 (executable)
@@ -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]))