From: Vincent Fu Date: Wed, 18 Jan 2023 15:52:31 +0000 (-0500) Subject: tools/fiograph: improve default output file name X-Git-Tag: fio-3.34~51 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=24ff9393bc3e85c8fb04ca4c2d47adaf5f688e58;p=fio.git tools/fiograph: improve default output file name Instead of removing all occurrences of '.fio' in the job filename, only remove '.fio' when it is at the end of the job filename. Signed-off-by: Vincent Fu --- diff --git a/tools/fiograph/fiograph.py b/tools/fiograph/fiograph.py index 8fbd1909..03c2cacd 100755 --- a/tools/fiograph/fiograph.py +++ b/tools/fiograph/fiograph.py @@ -294,7 +294,8 @@ def main(): args = setup_commandline() if args.output is None: output_file = args.file - output_file = output_file.replace('.fio', '') + if output_file.endswith('.fio'): + output_file = output_file[:-4] else: output_file = args.output config_file = configparser.RawConfigParser(allow_no_value=True)