bt2: do not require sink component's _graph_is_configured() method
[babeltrace.git] / src / bindings / python / bt2 / bt2 / component.py
index d7d42a71bf1447e1b2a46e07022d22268c8feebd..f31842181aa196dc81e681130ab8a796f7a5e7d5 100644 (file)
@@ -481,13 +481,6 @@ class _UserComponentType(type):
                 cls, comp_cls_name, 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(
@@ -833,6 +826,9 @@ class _UserSinkComponent(_UserComponent, _SinkComponent):
     def _bt_graph_is_configured_from_native(self):
         self._graph_is_configured()
 
+    def _graph_is_configured(self):
+        pass
+
     @property
     def _input_ports(self):
         def get_input_port_count(self_ptr):
This page took 0.023453 seconds and 4 git commands to generate.