X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fbabeltrace%2Fbabeltrace.i.in;fp=bindings%2Fpython%2Fbabeltrace%2Fbabeltrace.i.in;h=8eec1c1d1e7864ea1a6aa21063d0b50a90fb1aed;hp=a773e9b37379899dbf597117976f774221c126de;hb=64b7b73406242324460e4df149eff329b289192a;hpb=6cf823f6e01a23e85287b8a04bebb1d1a64c0d15 diff --git a/bindings/python/babeltrace/babeltrace.i.in b/bindings/python/babeltrace/babeltrace.i.in index a773e9b3..8eec1c1d 100644 --- a/bindings/python/babeltrace/babeltrace.i.in +++ b/bindings/python/babeltrace/babeltrace.i.in @@ -672,8 +672,11 @@ class CTFScope: _scopes = [CTFScope.EVENT_FIELDS, CTFScope.EVENT_CONTEXT, CTFScope.STREAM_EVENT_CONTEXT, CTFScope.STREAM_EVENT_HEADER, CTFScope.STREAM_PACKET_CONTEXT, CTFScope.TRACE_PACKET_HEADER] -import collections -class Event(collections.Mapping): +try: + import collections.abc as collections_abc +except ImportError: + import collections as collections_abc # Fallback for Python 3.2 +class Event(collections_abc.Mapping): """ This class represents an event from the trace. It is obtained using the TraceCollection generator functions.