~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

[r=benji][bug=815911] Fix package copier crash when dealing with
        invalid architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1010
1010
        #  <DESCRIPTION LN>
1011
1011
        descr_lines = [line.lstrip() for line in bpr.description.splitlines()]
1012
1012
        bin_description = (
1013
 
            '%s\n %s'% (bpr.summary, '\n '.join(descr_lines)))
 
1013
            '%s\n %s' % (bpr.summary, '\n '.join(descr_lines)))
1014
1014
 
1015
1015
        # Dealing with architecturespecific field.
1016
1016
        # Present 'all' in every archive index for architecture
1364
1364
            overrides = policy.calculateBinaryOverrides(
1365
1365
                archive, distroseries, pocket, bpn_archtag.keys())
1366
1366
            for override in overrides:
 
1367
                if override.distro_arch_series is None:
 
1368
                    continue
1367
1369
                bpph = bpn_archtag[
1368
1370
                    (override.binary_package_name,
1369
1371
                     override.distro_arch_series.architecturetag)]
1376
1378
            with_overrides = dict(
1377
1379
                (bpph.binarypackagerelease, (bpph.component, bpph.section,
1378
1380
                 bpph.priority)) for bpph in binaries)
 
1381
        if not with_overrides:
 
1382
            return list()
1379
1383
        return self.publishBinaries(
1380
1384
            archive, distroseries, pocket, with_overrides)
1381
1385