/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/plugin.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-03-18 20:00:38 UTC
  • mfrom: (3290.1.2 bzr.dev.plugins)
  • Revision ID: pqm@pqm.ubuntu.com-20080318200038-jo7mqokvib9aojt9
(James Westby) Strip "bzr_" from the start of the suggested plugin
 name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
            ## import pdb; pdb.set_trace()
200
200
            if re.search('\.|-| ', name):
201
201
                sanitised_name = re.sub('[-. ]', '_', name)
202
 
                warning("Unable to load %r in %r as a plugin because file path"
203
 
                        " isn't a valid module name; try renaming it to %r."
204
 
                        % (name, d, sanitised_name))
 
202
                if sanitised_name.startswith('bzr_'):
 
203
                    sanitised_name = sanitised_name[len('bzr_'):]
 
204
                warning("Unable to load %r in %r as a plugin because the "
 
205
                        "file path isn't a valid module name; try renaming "
 
206
                        "it to %r." % (name, d, sanitised_name))
205
207
            else:
206
208
                warning('Unable to load plugin %r from %r' % (name, d))
207
209
            log_exception_quietly()