bt2: check for _graph_is_configured method in user sink classes
[babeltrace.git] / src / bindings / python / bt2 / bt2 / component.py
index 9834fa8cc565dc4dc6f25595ab31a2358e6786ad..18b502ac6c1e150fbb328bab9f7bac0451061678 100644 (file)
@@ -443,6 +443,9 @@ class _UserComponentType(type):
                                                                  comp_cls_descr,
                                                                  comp_cls_help)
         elif _UserSinkComponent in bases:
+            if not hasattr(cls, '_graph_is_configured'):
+                raise bt2.IncompleteUserClass("cannot create component class '{}': missing a _graph_is_configured() method".format(class_name))
+
             if not hasattr(cls, '_consume'):
                 raise bt2.IncompleteUserClass("cannot create component class '{}': missing a _consume() method".format(class_name))
 
This page took 0.023356 seconds and 4 git commands to generate.