Deprecate 'convert' verb since it is just an implementation detail
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
parent
92544235d8
commit
40deb51ba4
2 changed files with 10 additions and 2 deletions
|
@ -18,12 +18,14 @@ from tracetools_analysis.convert import convert
|
|||
|
||||
|
||||
class ConvertVerb(VerbExtension):
|
||||
"""Convert trace data to a file."""
|
||||
"""Convert trace data to a file. DEPRECATED: use the 'process' verb directly."""
|
||||
|
||||
def add_arguments(self, parser, cli_name):
|
||||
add_args(parser)
|
||||
|
||||
def main(self, *, args):
|
||||
import warnings
|
||||
warnings.warn("'convert' is deprecated, use 'process' directly instead", stacklevel=2)
|
||||
return convert(
|
||||
args.trace_directory,
|
||||
args.output_file_name,
|
||||
|
|
|
@ -41,7 +41,11 @@ def add_args(parser: argparse.ArgumentParser) -> None:
|
|||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Convert trace data to a file.')
|
||||
description=(
|
||||
'Convert trace data to a file. '
|
||||
"DEPRECATED: use the 'process' verb directly."
|
||||
),
|
||||
)
|
||||
add_args(parser)
|
||||
return parser.parse_args()
|
||||
|
||||
|
@ -79,4 +83,6 @@ def main():
|
|||
trace_directory = args.trace_directory
|
||||
output_file_name = args.output_file_name
|
||||
|
||||
import warnings
|
||||
warnings.warn("'convert' is deprecated, use 'process' directly instead", stacklevel=2)
|
||||
convert(trace_directory, output_file_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue