bt2: cleanup: Remove unused `_StreamClassIterator` class
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 13 Aug 2019 16:23:59 +0000 (12:23 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 14 Aug 2019 22:02:06 +0000 (18:02 -0400)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I527c35015f5fb75dbcb55850932e0e0950d3b0ea
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1903
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/bindings/python/bt2/bt2/trace_class.py

index 64bdc011937ae2d85359bf600a140d2e477a32c7..1643fc8ecca1759a82e57e2bb588e963f89b53ef 100644 (file)
@@ -34,26 +34,6 @@ import collections.abc
 import functools
 
 
-class _StreamClassIterator(collections.abc.Iterator):
-    def __init__(self, trace_class):
-        self._trace_class = trace_class
-        self._at = 0
-
-    def __next__(self):
-        if self._at == len(self._trace_class):
-            raise StopIteration
-
-        borrow_stream_class_fn = (
-            native_bt.trace_class_borrow_stream_class_by_index_const
-        )
-        sc_ptr = borrow_stream_class_fn(self._trace_class._ptr, self._at)
-        assert sc_ptr
-        id = native_bt.stream_class_get_id(sc_ptr)
-        assert id >= 0
-        self._at += 1
-        return id
-
-
 def _trace_class_destruction_listener_from_native(user_listener, trace_class_ptr):
     trace_class = bt2_trace_class._TraceClass._create_from_ptr_and_get_ref(
         trace_class_ptr
This page took 0.026135 seconds and 4 git commands to generate.