~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-03 05:05:39 UTC
  • mfrom: (14514.3.5 new-python-apt)
  • Revision ID: launchpad@pqm.canonical.com-20120103050539-y6ipuo5e9illcrsr
[r=benji][bug=551510] Port to new python-apt API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
            url = canonical_url(target_object)
43
43
        else:
44
44
            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 = '>>'
45
51
        relationship_set.add(name, operator, version, url)
46
52
 
47
53
    return relationship_set
82
88
    def __iter__(self):
83
89
        return iter(sorted(
84
90
            self.contents, key=std_operator.attrgetter('name')))
85