~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Raphael Badin
  • Date: 2011-08-11 14:47:01 UTC
  • mto: This revision was merged to the branch mainline in revision 13714.
  • Revision ID: raphael.badin@canonical.com-20110811144701-3q694t8a7f252h86
Expand IDS checks to the pockets copied, limit IDS checks to the architectures copied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
        used simply to keep trusted code DRY.
384
384
 
385
385
        :param architectures: an iterable of architectures to process.
386
 
        :param arch_tag: an optional architecture tag with which to filter
387
 
            the results.
 
386
        :param arch_tag: an optional architecture tag or a tag list with
 
387
            which to filter the results.
388
388
        :return: a list of the ids of the architectures matching arch_tag.
389
389
        """
390
390
        # If arch_tag was not provided, just return the ids without
392
392
        if arch_tag is None:
393
393
            return [arch.id for arch in architectures]
394
394
        else:
 
395
            if type(arch_tag) is not list:
 
396
                arch_tag = (arch_tag, )
395
397
            return [arch.id for arch in architectures
396
 
                        if arch_tag == arch.architecturetag]
 
398
                        if arch.architecturetag in arch_tag]
397
399
 
398
400
 
399
401
class PocketChroot(SQLBase):