diff options
author | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2020-12-31 03:22:06 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-12 20:40:01 +0000 |
commit | a6429b9ff0995ab9b3052112e11485eb49dac5c0 (patch) | |
tree | 79d5de2b29337db3b9fb86ac7b69b4a50dde5017 /testing/buildlog.py | |
parent | aceee8e737fc44e95963ed82e6b33874c8a3a851 (diff) |
testing: use f-strings
Change-Id: I55a614b5cabe9b3dcc45de17e7a22c47ae0e643d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 8c1b6d88c19633a7373c052a2af3f584ad2114f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'testing/buildlog.py')
-rw-r--r-- | testing/buildlog.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/testing/buildlog.py b/testing/buildlog.py index d9e960418..4e41cbaf5 100644 --- a/testing/buildlog.py +++ b/testing/buildlog.py @@ -86,10 +86,10 @@ class BuildLog(object): build_dir = f_contents_split[0] build_classifiers = "" except IndexError: - print(dedent(""" + print(dedent(f""" Error: There was an issue finding the build dir and its - characteristics, in the following considered file: '{}' - """.format(fpath))) + characteristics, in the following considered file: '{fpath}' + """)) sys.exit(1) if not os.path.exists(build_dir): @@ -100,7 +100,7 @@ class BuildLog(object): if os.path.exists(build_dir): print("Note: build_dir was probably moved.") else: - print("Warning: missing build dir %s" % build_dir) + print(f"Warning: missing build dir {build_dir}") continue entry = LogEntry(log_dir, build_dir, build_classifiers) build_history.append(entry) @@ -122,9 +122,8 @@ class BuildLog(object): if lst: def warn_problem(func, path, exc_info): cls, ins, _ = exc_info - print("rmtree({}) warning: problem with {}:\n {}: {}".format( - func.__name__, path, - cls.__name__, ins.args)) + print(f"rmtree({func.__name__}) warning: problem with " + f"{path}:\n {cls.__name__}: {ins.args}") lst.sort() log_dir = lst[-1] |