bt2: raise when bt2.create_plugin_from_name() finds nothing
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 11 Feb 2017 18:23:12 +0000 (13:23 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:38 +0000 (12:57 -0400)
commit9a0a47aeda7c5de37b7090c074bd9031109bb47d
tree1c661590372114cc1d39d595d3d1fa498526afdb
parent5933c0f2e81353a0bce0893f44408be7014ca500
bt2: raise when bt2.create_plugin_from_name() finds nothing

Returning None from this function when there's no plugin is Pythonically
weird:

    plugin = bt2.create_plugin_from_name()
    print(plugin.name)

The execution should not reach print() here when the plugin is not
found.

Raise the new bt2.NoSuchPluginError exception instead.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/bt2/__init__.py.in
bindings/python/bt2/plugin.py
This page took 0.025642 seconds and 4 git commands to generate.