Move to kernel style SPDX license identifiers
[babeltrace.git] / src / bindings / python / bt2 / bt2 / trace_collection_message_iterator.py
index b91440df4d6211a63a15dfe1f657cb2edda2b565..b9db82cd13716e90f57ff0d6481af8b6013b944f 100644 (file)
@@ -1,24 +1,6 @@
-# The MIT License (MIT)
+# SPDX-License-Identifier: MIT
 #
 # Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
 
 from bt2 import utils, native_bt
 import bt2
@@ -76,7 +58,8 @@ class ComponentSpec(_BaseComponentSpec):
         super().__init__(params, obj, logging_level)
 
         is_cc_object = isinstance(
-            component_class, (bt2._SourceComponentClass, bt2._FilterComponentClass)
+            component_class,
+            (bt2._SourceComponentClassConst, bt2._FilterComponentClassConst),
         )
         is_user_cc_type = isinstance(
             component_class, bt2_component._UserComponentType
@@ -258,15 +241,13 @@ def _get_ns(obj):
 
 
 class _TraceCollectionMessageIteratorProxySink(bt2_component._UserSinkComponent):
-    def __init__(self, params, msg_list):
+    def __init__(self, config, params, msg_list):
         assert type(msg_list) is list
         self._msg_list = msg_list
         self._add_input_port('in')
 
     def _user_graph_is_configured(self):
-        self._msg_iter = self._create_input_port_message_iterator(
-            self._input_ports['in']
-        )
+        self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
     def _user_consume(self):
         assert self._msg_list[0] is None
This page took 0.023804 seconds and 4 git commands to generate.