X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Ftrace_class.py;h=a28a20ea91c0e1a34061c081869a27d9e0bd7794;hb=2e90378a2b94006e2743b06e7fe7a1f0e691a56e;hp=9ae57ade86e61c59b2487ce2bc712cc22ac2dc61;hpb=d47b87ac209ea8f1b98b7e6cf209dfd4bf9cc9c0;p=babeltrace.git diff --git a/bindings/python/bt2/bt2/trace_class.py b/bindings/python/bt2/bt2/trace_class.py index 9ae57ade..a28a20ea 100644 --- a/bindings/python/bt2/bt2/trace_class.py +++ b/bindings/python/bt2/bt2/trace_class.py @@ -172,16 +172,20 @@ class TraceClass(object._SharedObject, collections.abc.Mapping): assigns_automatic_event_class_id=True, assigns_automatic_stream_id=True, packets_have_default_beginning_clock_snapshot=False, - packets_have_default_end_clock_snapshot=False): + packets_have_default_end_clock_snapshot=False, + supports_discarded_events=False, + discarded_events_have_default_clock_snapshots=False, + supports_discarded_packets=False, + discarded_packets_have_default_clock_snapshots=False): if self.assigns_automatic_stream_class_id: if id is not None: - raise bt2.CreationError('id provided, but trace class assigns automatic stream class ids') + raise ValueError('id provided, but trace class assigns automatic stream class ids') sc_ptr = native_bt.stream_class_create(self._ptr) else: if id is None: - raise bt2.CreationError('id not provided, but trace class does not assign automatic stream class ids') + raise ValueError('id not provided, but trace class does not assign automatic stream class ids') utils._check_uint64(id) sc_ptr = native_bt.stream_class_create_with_id(self._ptr, id) @@ -204,7 +208,10 @@ class TraceClass(object._SharedObject, collections.abc.Mapping): sc._assigns_automatic_stream_id = assigns_automatic_stream_id sc._packets_have_default_beginning_clock_snapshot = packets_have_default_beginning_clock_snapshot sc._packets_have_default_end_clock_snapshot = packets_have_default_end_clock_snapshot - + sc._set_supports_discarded_events(supports_discarded_events, + discarded_events_have_default_clock_snapshots) + sc._set_supports_discarded_packets(supports_discarded_packets, + discarded_packets_have_default_clock_snapshots) return sc @property