self._logging_level = logging_level
if type(params) is str:
- self._params = bt2.create_value({'paths': [params]})
+ self._params = bt2.create_value({'inputs': [params]})
else:
self._params = bt2.create_value(params)
def _create_stream_intersection_trimmer(self, component, port):
# find the original parameters specified by the user to create
- # this port's component to get the `path` parameter
+ # this port's component to get the `inputs` parameter
for src_comp_and_spec in self._src_comps_and_specs:
if component == src_comp_and_spec.comp:
break
try:
- paths = src_comp_and_spec.spec.params['paths']
+ inputs = src_comp_and_spec.spec.params['inputs']
except Exception as e:
- raise bt2.Error(
- 'all source components must be created with a "paths" parameter in stream intersection mode'
+ raise ValueError(
+ 'all source components must be created with an "inputs" parameter in stream intersection mode'
) from e
- params = {'paths': paths}
+ params = {'inputs': inputs}
# query the port's component for the `trace-info` object which
# contains the stream intersection range for each exposed
pass
if begin is None or end is None:
- raise bt2.Error(
+ raise RuntimeError(
'cannot find stream intersection range for port "{}"'.format(port.name)
)
plugin = bt2.find_plugin('utils')
if plugin is None:
- raise bt2.Error('cannot find "utils" plugin (needed for the muxer)')
+ raise RuntimeError('cannot find "utils" plugin (needed for the muxer)')
if 'muxer' not in plugin.filter_component_classes:
- raise bt2.Error(
+ raise RuntimeError(
'cannot find "muxer" filter component class in "utils" plugin'
)
plugin = bt2.find_plugin('utils')
if plugin is None:
- raise bt2.Error('cannot find "utils" plugin (needed for the trimmer)')
+ raise RuntimeError('cannot find "utils" plugin (needed for the trimmer)')
if 'trimmer' not in plugin.filter_component_classes:
- raise bt2.Error(
+ raise RuntimeError(
'cannot find "trimmer" filter component class in "utils" plugin'
)
plugin = bt2.find_plugin(comp_spec.plugin_name)
if plugin is None:
- raise bt2.Error('no such plugin: {}'.format(comp_spec.plugin_name))
+ raise ValueError('no such plugin: {}'.format(comp_spec.plugin_name))
if comp_cls_type == _CompClsType.SOURCE:
comp_classes = plugin.source_component_classes
if comp_spec.class_name not in comp_classes:
cc_type = 'source' if comp_cls_type == _CompClsType.SOURCE else 'filter'
- raise bt2.Error(
+ raise ValueError(
'no such {} component class in "{}" plugin: {}'.format(
cc_type, comp_spec.plugin_name, comp_spec.class_name
)