~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Vincent Ladeuil
  • Date: 2010-06-09 18:08:25 UTC
  • mto: (5285.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5286.
  • Revision ID: v.ladeuil+lp@free.fr-20100609180825-dg796sxz7kxgkequ
Catch the wrong path descriptions in BZR_PLUGINS_AT.

* bzrlib/tests/test_plugins.py:
(TestLoadPluginAtSyntax.test_bogus_path): Fix typo. Add more
bogus cases.

* bzrlib/plugin.py:
(_get_specific_plugin_paths): Catch format errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
        return []
99
99
    specs = []
100
100
    for spec in paths.split(os.pathsep):
101
 
        name, path = spec.split('@')
 
101
        try:
 
102
            name, path = spec.split('@')
 
103
        except ValueError:
 
104
            raise errors.BzrCommandError(
 
105
                '"%s" is not a valid <plugin_name>@<plugin_path> description '
 
106
                % spec)
102
107
        specs.append((name, path))
103
108
    return specs
104
109