From 24ff9393bc3e85c8fb04ca4c2d47adaf5f688e58 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Wed, 18 Jan 2023 10:52:31 -0500 Subject: [PATCH] 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 --- tools/fiograph/fiograph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.25.1