~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/__init__.py

  • Committer: Robey Pointer
  • Date: 2006-08-29 20:47:02 UTC
  • mto: (1711.9.9 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1975.
  • Revision ID: robey@lag.net-20060829204702-6d40ae7a33ec62c7
remove usage of has_key()

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
        raise errors.NotABundle('Did not find an opening header')
70
70
 
71
71
    # Now we have a version, to figure out how to read the bundle 
72
 
    if not _serializers.has_key(version):
 
72
    if version not in _serializers:
73
73
        raise errors.BundleNotSupported(version, 
74
74
            'version not listed in known versions')
75
75
 
87
87
    :param version: [optional] target serialization version
88
88
    """
89
89
 
90
 
    if not _serializers.has_key(version):
 
90
    if version not in _serializers:
91
91
        raise errors.BundleNotSupported(version, 'unknown bundle format')
92
92
 
93
93
    serializer = _serializers[version](version)
262
262
        _serializers[version] = klass
263
263
        return
264
264
 
265
 
    if not _serializers.has_key(version):
 
265
    if version not in _serializers:
266
266
        _serializers[version] = klass
267
267
 
268
268