~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Robert Collins
  • Date: 2005-10-16 00:23:27 UTC
  • mfrom: (1442.1.23)
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051016002327-3181e7214d4e132f
make plugins able to use other plugins in normal python style

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
 
26
26
import os
 
27
import bzrlib
27
28
from bzrlib.config import config_dir
28
29
DEFAULT_PLUGIN_PATH = os.path.join(config_dir(), 'plugins')
29
30
 
110
111
                plugin_info = imp.find_module(name, [d])
111
112
                mutter('load plugin %r' % (plugin_info,))
112
113
                try:
113
 
                    plugin = imp.load_module('bzrlib.plugin.' + name,
 
114
                    plugin = imp.load_module('bzrlib.plugins.' + name,
114
115
                                             *plugin_info)
115
116
                    all_plugins.append(plugin)
 
117
                    setattr(bzrlib.plugins, name, plugin)
116
118
                finally:
117
119
                    if plugin_info[0] is not None:
118
120
                        plugin_info[0].close()