summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d14a864)
The "graph is configured" method is not required when you implement a
component class in C, as it's not strictly needed to make the graph
runnable, so it should not be required in Python either.
A default _UserSinkComponent._graph_is_configured() method is added to
make it optional.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I3ef4e3d159af61e2d06a0a47dddc1234aed93ae1
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1740
Tested-by: jenkins <jenkins@lttng.org>
cls, comp_cls_name, comp_cls_descr, comp_cls_help
)
elif _UserSinkComponent in bases:
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(
if not hasattr(cls, '_consume'):
raise bt2.IncompleteUserClass(
"cannot create component class '{}': missing a _consume() method".format(
def _bt_graph_is_configured_from_native(self):
self._graph_is_configured()
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):
@property
def _input_ports(self):
def get_input_port_count(self_ptr):