~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-08 16:01:53 UTC
  • mfrom: (4679.5.2 2.1-static-tuple-no-use)
  • mto: This revision was merged to the branch mainline in revision 4771.
  • Revision ID: john@arbash-meinel.com-20091008160153-krcoicv53v517v7f
Merge in the static-tuple-no-use branch, and bring back the chk_map use.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    debug,
41
41
    errors,
42
42
    )
43
 
from bzrlib._static_tuple_c import StaticTuple
44
43
 
45
44
_HEADER_READV = (0, 200)
46
45
_OPTION_KEY_ELEMENTS = "key_elements="
103
102
 
104
103
    def _check_key(self, key):
105
104
        """Raise BadIndexKey if key is not a valid key for this index."""
106
 
        if type(key) not in (tuple, StaticTuple):
 
105
        if type(key) != tuple:
107
106
            raise errors.BadIndexKey(key)
108
107
        if self._key_length != len(key):
109
108
            raise errors.BadIndexKey(key)