~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/scripts/initialize_distroseries.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-19 16:47:37 UTC
  • mfrom: (13733.1.1 distroseries_ids)
  • Revision ID: launchpad@pqm.canonical.com-20110819164737-hhuvsgh9cmu4n1v0
[r=allenap][no-qa] Use distroseries.id instead of distroseries as the
        key in a dict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        Restrict the check to the selected packages if a limited set of
184
184
        packagesets is used by the initialization.
185
185
        """
186
 
        spns = self.source_names_by_parent.get(parent, None)
 
186
        spns = self.source_names_by_parent.get(parent.id, None)
187
187
        if spns is not None and len(spns) == 0:
188
188
            # If no sources are selected in this parent, skip the check.
189
189
            return
213
213
            PackageUploadStatus.ACCEPTED,
214
214
            PackageUploadStatus.UNAPPROVED,
215
215
            ]
216
 
        spns = self.source_names_by_parent.get(parent, None)
 
216
        spns = self.source_names_by_parent.get(parent.id, None)
217
217
        if spns is not None and len(spns) == 0:
218
218
            # If no sources are selected in this parent, skip the check.
219
219
            return
430
430
                for pkgset in self.packagesets:
431
431
                    if pkgset.distroseries == parent:
432
432
                        spns += list(pkgset.getSourcesIncluded())
433
 
                source_names_by_parent[parent] = spns
 
433
                source_names_by_parent[parent.id] = spns
434
434
        self.source_names_by_parent = source_names_by_parent
435
435
 
436
436
    def _copy_publishing_records(self, distroarchseries_lists):
445
445
        archive_set = getUtility(IArchiveSet)
446
446
 
447
447
        for parent in self.derivation_parents:
448
 
            spns = self.source_names_by_parent.get(parent, None)
 
448
            spns = self.source_names_by_parent.get(parent.id, None)
449
449
            if spns is not None and len(spns) == 0:
450
450
                # Some packagesets where selected but not a single
451
451
                # source from this parent: we skip the copy since