/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/export/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2010-11-05 20:54:32 UTC
  • mfrom: (5526 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5527.
  • Revision ID: john@arbash-meinel.com-20101105205432-rmyozu8sthyhmri8
Merge bzr.dev to resolve bzr-2.3.txt (aka NEWS)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
"""
21
21
 
22
22
import os
23
 
import bzrlib.errors as errors
 
23
from bzrlib import (
 
24
    errors,
 
25
    pyutils,
 
26
    )
24
27
 
25
28
# Maps format name => export function
26
29
_exporters = {}
55
58
    When requesting a specific type of export, load the respective path.
56
59
    """
57
60
    def _loader(tree, dest, root, subdir, filtered, per_file_timestamps):
58
 
        mod = __import__(module, globals(), locals(), [funcname])
59
 
        func = getattr(mod, funcname)
 
61
        func = pyutils.get_named_object(module, funcname)
60
62
        return func(tree, dest, root, subdir, filtered=filtered,
61
63
                    per_file_timestamps=per_file_timestamps)
62
64
    register_exporter(scheme, extensions, _loader)