Remove `skip-string-normalization` in Python formatter config
[babeltrace.git] / tests / data / cli / query / bt_plugin_query.py
CommitLineData
0235b0db 1# SPDX-License-Identifier: GPL-2.0-only
0076e742
SM
2#
3# Copyright (C) 2019 EfficiOS Inc.
4#
0076e742
SM
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):
f5567ea8
FD
16 if obj == "please-fail":
17 raise ValueError("catastrophic failure")
0076e742 18
f5567ea8 19 return obj + ":" + to_string(params)
0076e742
SM
20
21
22bt2.register_plugin(__name__, "query")
This page took 0.033158 seconds and 4 git commands to generate.