~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inter.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Inter-object utility class."""
19
19
 
20
20
 
 
21
from bzrlib.errors import NoCompatibleInter
 
22
 
 
23
 
21
24
class InterObject(object):
22
25
    """This class represents operations taking place between two objects.
23
26
 
81
84
        for provider in reversed(klass._optimisers):
82
85
            if provider.is_compatible(source, target):
83
86
                return provider(source, target)
84
 
        return klass(source, target)
 
87
        raise NoCompatibleInter(source, target)
85
88
 
86
89
    def lock_read(self):
87
90
        """Take out a logical read lock.