]> err.no Git - dak/commitdiff
daklib/archive.py: set final_suites earlier.
authorAnsgar Burchardt <ansgar@debian.org>
Sat, 15 Sep 2012 13:59:44 +0000 (15:59 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Sun, 16 Sep 2012 14:45:30 +0000 (16:45 +0200)
daklib/archive.py

index ef5fceb0da97b16da2bcac62cb289e576888af8e..fdd7cd7d1f9419056d4f63b8266573ab6b5a6079 100644 (file)
@@ -595,6 +595,11 @@ class ArchiveUpload(object):
         @type: bool
         """
 
+        self._checked = False
+        """checks passes. set by C{check}
+        @type: bool
+        """
+
         self._new_queue = self.session.query(PolicyQueue).filter_by(queue_name='new').one()
         self._new = self._new_queue.suite
 
@@ -867,6 +872,8 @@ class ArchiveUpload(object):
                 self.reject_reasons.append('No target suite found. Please check your target distribution and that you uploaded to the right archive.')
                 return False
 
+            self.final_suites = final_suites
+
             for chk in (
                     checks.TransitionCheck,
                     checks.UploadBlockCheck,
@@ -887,7 +894,7 @@ class ArchiveUpload(object):
             if len(self.reject_reasons) != 0:
                 return False
 
-            self.final_suites = final_suites
+            self._checked = True
             return True
         except checks.Reject as e:
             self.reject_reasons.append(unicode(e))
@@ -1004,6 +1011,7 @@ class ArchiveUpload(object):
         assert len(self.reject_reasons) == 0
         assert self.changes.valid_signature
         assert self.final_suites is not None
+        assert self._checked
 
         byhand = self.changes.byhand_files
         if len(byhand) == 0:
@@ -1115,6 +1123,7 @@ class ArchiveUpload(object):
         assert len(self.reject_reasons) == 0
         assert self.changes.valid_signature
         assert self.final_suites is not None
+        assert self._checked
         assert not self.new
 
         db_changes = self._install_changes()