Fix: bt2: read properties on _DiscardedEventsMessage
authorSimon Marchi <simon.marchi@efficios.com>
Sat, 11 Apr 2020 16:17:36 +0000 (12:17 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 14 Apr 2020 20:00:23 +0000 (16:00 -0400)
commit31592d1297d3cca30270ae94e34301fd3592f561
tree5d97efa31e10fd111c0dff977a8cfbd4d7b8c5aa
parent356ada2b3523dc7f056973111399915153c6294a
Fix: bt2: read properties on _DiscardedEventsMessage

Reading the count and clock snapshot properties on a _DiscardedEventsMessage
does not work.  For example, this:

    msg = self._create_discarded_events_message(stream, count=10)
    print(msg.count)

Results in:

      File "test.py", line 10, in __init__
        print(msg.count)
      File "/home/simark/build/babeltrace/src/bindings/python/bt2/build/build_lib/bt2/message.py", line 208, in count
        avail, count = self._get_count(self._ptr)
    AttributeError: '_DiscardedEventsMessage' object has no attribute '_get_count'

The problem is simply that _DiscardedEventsMessage is missing inheriting
from _DiscardedEventsMessageConst.

Change-Id: Id40ea54bb26b4e4aec264d84bda52ed815090341
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3392
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3365
src/bindings/python/bt2/bt2/message.py
tests/bindings/python/bt2/test_message.py
This page took 0.023938 seconds and 4 git commands to generate.