From 36d9460da8c2d8aeab46c05be35526c5ee948f7d Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 17 Aug 2019 01:24:46 -0400 Subject: [PATCH] bt2: make _create_event_message's parent parameter mandatory The `parent` parameter of _create_event_message currently has the None default value. However, None is never a valid value, as parent must either be a Stream or a Packet. Having a None default value makes it look like the parameter is optional, but is actually always required. Therefore, remove the None default value from the parameter. Change-Id: Id0f8d64006ca25281529fc6bb3b9912365799f44 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/1962 Tested-by: jenkins Reviewed-by: Francis Deslauriers Reviewed-by: Philippe Proulx --- src/bindings/python/bt2/bt2/message_iterator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bindings/python/bt2/bt2/message_iterator.py b/src/bindings/python/bt2/bt2/message_iterator.py index 23d6fbd5..5895b237 100644 --- a/src/bindings/python/bt2/bt2/message_iterator.py +++ b/src/bindings/python/bt2/bt2/message_iterator.py @@ -184,9 +184,7 @@ class _UserMessageIterator(_MessageIterator): return _UserComponentInputPortMessageIterator(msg_iter_ptr) - def _create_event_message( - self, event_class, parent=None, default_clock_snapshot=None - ): + def _create_event_message(self, event_class, parent, default_clock_snapshot=None): utils._check_type(event_class, bt2_event_class._EventClass) if event_class.stream_class.supports_packets: -- 2.34.1