X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Ftrace_collection_message_iterator.py;fp=bindings%2Fpython%2Fbt2%2Fbt2%2Ftrace_collection_message_iterator.py;h=2185fcd5772aa1ccbaba13ad48d68123fd21d05e;hp=269e796227586e647907cea23301b64c8416529a;hb=a38d765099a8eb46b2b319381054db90a75029a9;hpb=55c68a1a729551ca7d697d6e771064a06a19c206 diff --git a/bindings/python/bt2/bt2/trace_collection_message_iterator.py b/bindings/python/bt2/bt2/trace_collection_message_iterator.py index 269e7962..2185fcd5 100644 --- a/bindings/python/bt2/bt2/trace_collection_message_iterator.py +++ b/bindings/python/bt2/bt2/trace_collection_message_iterator.py @@ -140,14 +140,15 @@ class TraceCollectionMessageIterator(bt2.message_iterator._MessageIterator): begin = None end = None - # find the trace info for this port's trace by name's prefix + # find the trace info for this port's trace try: for trace_info in trace_info_res: - if port.name.startswith(str(trace_info['path'])): - range_ns = trace_info['intersection-range-ns'] - begin = range_ns['begin'] - end = range_ns['end'] - break + for stream in trace_info['streams']: + if stream['port-name'] == port.name: + range_ns = trace_info['intersection-range-ns'] + begin = range_ns['begin'] + end = range_ns['end'] + break except Exception: pass