This method's name suggests that it's public and can be called by the
user, but that's not the case, since it is overwritten by the write-only
property just below. Example:
File
"/home/smarchi/build/babeltrace/src/bindings/python/bt2/build/build_lib/bt2/message_iterator.py",
line 142, in _bt_init_from_native
self.__init__(config, self_output_port)
File "/home/smarchi/src/babeltrace/test.py", line 11, in __init__
config.can_seek_forward(False)
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: property 'can_seek_forward' of '_MessageIteratorConfiguration'
object has no getter
Rename it to something that's more obviously not intended for the user.
Change-Id: Ibef9cd8297569e2d4daea01ede00f3f0735abd90
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/13387
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
def __init__(self, ptr):
self._ptr = ptr
- def can_seek_forward(self, value):
+ def _set_can_seek_forward(self, value):
bt2_utils._check_bool(value)
native_bt.self_message_iterator_configuration_set_can_seek_forward(
self._ptr, value
)
- can_seek_forward = property(fset=can_seek_forward)
+ can_seek_forward = property(fset=_set_can_seek_forward)
# This is extended by the user to implement component classes in Python. It