~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/__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:
42
42
    """
43
43
    global _exporters, _exporter_extensions
44
44
 
45
 
    if not _exporters.has_key(format) or override:
 
45
    if (format not in _exporters) or override:
46
46
        _exporters[format] = func
47
47
 
48
48
    for ext in extensions:
49
 
        if not _exporter_extensions.has_key(ext) or override:
 
49
        if (ext not in _exporter_extensions) or override:
50
50
            _exporter_extensions[ext] = format
51
51
 
52
52
 
90
90
    if root is None:
91
91
        root = get_root_name(dest)
92
92
 
93
 
    if not _exporters.has_key(format):
 
93
    if format not in _exporters:
94
94
        raise errors.NoSuchExportFormat(format)
95
95
    return _exporters[format](tree, dest, root)
96
96