~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/browser/packagerelationship.py

  • Committer: Curtis Hovey
  • Date: 2011-12-24 17:49:30 UTC
  • mto: This revision was merged to the branch mainline in revision 14602.
  • Revision ID: curtis.hovey@canonical.com-20111224174930-xk1d5cvhyxq46ctf
Moved webapp to lp.services.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    ]
12
12
 
13
13
import operator as std_operator
14
 
 
15
14
from zope.interface import implements
16
15
 
17
16
from lp.services.webapp import canonical_url
42
41
            url = canonical_url(target_object)
43
42
        else:
44
43
            url = None
45
 
        # The apt_pkg 0.8 API returns '<' and '>' rather than the '<<' and
46
 
        # '>>' form used in control files.
47
 
        if operator == '<':
48
 
            operator = '<<'
49
 
        elif operator == '>':
50
 
            operator = '>>'
51
44
        relationship_set.add(name, operator, version, url)
52
45
 
53
46
    return relationship_set
88
81
    def __iter__(self):
89
82
        return iter(sorted(
90
83
            self.contents, key=std_operator.attrgetter('name')))
 
84