X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Fgraph.py;fp=bindings%2Fpython%2Fbt2%2Fbt2%2Fgraph.py;h=c630cf0ac57a95b623bf53ae956b713607f0d36a;hb=2ae9f48c88d9359f2b2bf1cbac3c6dab5a22cfbb;hp=d38a0fd183f697dc82e4ebb4696b821c3d440760;hpb=36d1acad60fd6c9cfb933f3f2fbc039443d47115;p=babeltrace.git diff --git a/bindings/python/bt2/bt2/graph.py b/bindings/python/bt2/bt2/graph.py index d38a0fd1..c630cf0a 100644 --- a/bindings/python/bt2/bt2/graph.py +++ b/bindings/python/bt2/bt2/graph.py @@ -192,6 +192,15 @@ class Graph(object._SharedObject): assert(is_canceled >= 0) return is_canceled > 0 + def create_output_port_message_iterator(self, output_port): + utils._check_type(output_port, bt2.port._OutputPort) + msg_iter_ptr = native_bt.port_output_message_iterator_create(self._ptr, output_port._ptr) + + if msg_iter_ptr is None: + raise bt2.CreationError('cannot create output port message iterator') + + return bt2.message_iterator._OutputPortMessageIterator(msg_iter_ptr) + def __eq__(self, other): if type(other) is not type(self): return False