~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/binarypackagebuild.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
    'BinaryPackageBuildSet',
10
10
    ]
11
11
 
12
 
import collections
13
12
import datetime
14
13
import logging
15
14
import operator
885
884
 
886
885
        # Add query clause that filters on pocket if the latter is provided.
887
886
        if pocket:
888
 
            if not isinstance(pocket, collections.Sequence):
 
887
            if not isinstance(pocket, (list, tuple)):
889
888
                pocket = (pocket,)
890
889
 
891
890
            queries.append('PackageBuild.pocket IN %s' % sqlvalues(pocket))
901
900
        # Add query clause that filters on source package release name if the
902
901
        # latter is provided.
903
902
        if name is not None:
904
 
            if not isinstance(name, collections.Sequence):
 
903
            if not isinstance(name, (list, tuple)):
905
904
                queries.append('''
906
905
                    BinaryPackageBuild.source_package_release =
907
906
                        SourcePackageRelease.id AND