~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/adapters.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-28 17:34:34 UTC
  • mfrom: (13506.9.10 dsp-vocab-contracts)
  • Revision ID: launchpad@pqm.canonical.com-20110728173434-xm8jb9xmnhjuzb0i
[r=jcsackett][bug=817066] Fix DSP vocabs contract with
 IHugeVocabulary and its widgets. Added IDistribution adapters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    'distroseries_to_distribution',
10
10
    'PollSubset',
11
11
    'productseries_to_product',
 
12
    'sourcepackage_to_distribution',
12
13
    ]
13
14
 
14
15
 
28
29
    )
29
30
 
30
31
 
 
32
def sourcepackage_to_distribution(source_package):
 
33
    """Adapts `ISourcePackage` object to `IDistribution`.
 
34
 
 
35
    This also supports `IDistributionSourcePackage`
 
36
    """
 
37
    return source_package.distribution
 
38
 
 
39
 
31
40
def distroseries_to_distribution(distroseries):
32
41
    """Adapts `IDistroSeries` object to `IDistribution`.
33
42