X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Ftrace_class.py;h=dc9439eb6aa424215d3ac883249699b115796852;hb=ab6a6968d20cb3192c58f43420ae51c3da21101c;hp=1d05dba9f67ccda08cc5963bfd59433374bbf79f;hpb=de821fe507f035622c474f097b226f30cd3c7491;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/trace_class.py b/src/bindings/python/bt2/bt2/trace_class.py index 1d05dba9..dc9439eb 100644 --- a/src/bindings/python/bt2/bt2/trace_class.py +++ b/src/bindings/python/bt2/bt2/trace_class.py @@ -117,7 +117,7 @@ class _TraceClassConst(object._SharedObject, collections.abc.Mapping): if listener_handle._obj.addr != self.addr: raise ValueError( - 'This trace class destruction listener does not match the trace object.' + 'This trace class destruction listener does not match the trace class object.' ) if listener_handle._listener_id is None: @@ -190,6 +190,23 @@ class _TraceClass(_TraceClassConst): supports_discarded_packets=False, discarded_packets_have_default_clock_snapshots=False, ): + # Validate parameters before we create the object. + bt2_stream_class._StreamClass._validate_create_params( + name, + user_attributes, + packet_context_field_class, + event_common_context_field_class, + default_clock_class, + assigns_automatic_event_class_id, + assigns_automatic_stream_id, + supports_packets, + packets_have_beginning_default_clock_snapshot, + packets_have_end_default_clock_snapshot, + supports_discarded_events, + discarded_events_have_default_clock_snapshots, + supports_discarded_packets, + discarded_packets_have_default_clock_snapshots, + ) if self.assigns_automatic_stream_class_id: if id is not None: