~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-17 13:43:13 UTC
  • mto: This revision was merged to the branch mainline in revision 13714.
  • Revision ID: raphael.badin@canonical.com-20110817134313-30bjzd1pc5zn2tz6
Use isinstance(arch_tag, (list, tuple) instead of isinstance(arch_tag, collections.Sequence.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
           'PocketChroot'
10
10
           ]
11
11
 
12
 
import collections
13
 
 
14
12
from sqlobject import (
15
13
    BoolCol,
16
14
    ForeignKey,
392
390
        if arch_tag is None:
393
391
            return [arch.id for arch in architectures]
394
392
        else:
395
 
            if not isinstance(arch_tag, collections.Sequence):
 
393
            if not isinstance(arch_tag, (list, tuple)):
396
394
                arch_tag = (arch_tag, )
397
395
            return [arch.id for arch in architectures
398
396
                        if arch.architecturetag in arch_tag]