Move to kernel style SPDX license identifiers
[babeltrace.git] / tests / data / cli / query / bt_plugin_query.py
... / ...
CommitLineData
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Copyright (C) 2019 EfficiOS Inc.
4#
5
6import bt2
7from cli_params_to_string import to_string
8
9
10@bt2.plugin_component_class
11class SourceWithQueryThatPrintsParams(
12 bt2._UserSourceComponent, message_iterator_class=bt2._UserMessageIterator
13):
14 @classmethod
15 def _user_query(cls, executor, obj, params, method_obj):
16 if obj == 'please-fail':
17 raise ValueError('catastrophic failure')
18
19 return obj + ':' + to_string(params)
20
21
22bt2.register_plugin(__name__, "query")
This page took 0.022737 seconds and 4 git commands to generate.