bt2: raise when bt2.create_plugin_from_name() finds nothing
[babeltrace.git] / bindings / python / bt2 / plugin.py
index 9ce4c53a61ab3f228209e2df40ba03324af388d9..920eb63642d71502868c3cc3becbe69e3c41e3af 100644 (file)
@@ -61,7 +61,7 @@ def create_plugin_from_name(name):
     plugin_ptr = native_bt.plugin_create_from_name(name)
 
     if plugin_ptr is None:
-        return
+        raise bt2.NoSuchPluginError(name)
 
     return _Plugin._create_from_ptr(plugin_ptr)
 
This page took 0.023144 seconds and 4 git commands to generate.