~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/queue.py

[r=sinzui][no-qa] Drop Distribution.getFileByName in favour of the
 one on Archive.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1121
1121
 
1122
1122
    def verifyBeforePublish(self):
1123
1123
        """See `IPackageUploadSource`."""
1124
 
        distribution = self.packageupload.distroseries.distribution
1125
1124
        # Check for duplicate filenames currently present in the archive.
1126
1125
        for source_file in self.sourcepackagerelease.files:
1127
1126
            try:
1128
 
                published_file = distribution.getFileByName(
1129
 
                    source_file.libraryfile.filename, binary=False,
1130
 
                    archive=self.packageupload.archive)
 
1127
                published_file = self.packageupload.archive.getFileByName(
 
1128
                    source_file.libraryfile.filename)
1131
1129
            except NotFoundError:
1132
1130
                # NEW files are *OK*.
1133
1131
                continue