diff options
author | Christian Tismer <tismer@stackless.com> | 2021-07-28 13:35:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-28 16:41:52 +0000 |
commit | 49cd96eba9d0dbe0334b9e2f1f1fa4fa3499c033 (patch) | |
tree | 07c8a66777b42ecc785ebb6eb6a372ce9b127a69 | |
parent | 25cc8018e5c4be3a85b9ef8c9257abb3d47f968c (diff) |
testing: use f-strings, fix
f-string usage was wrong in command.py with triple-quotes.
The effect was quite visible when inspection build logs.
Also note: f-string expressions cannot contain back-slashes.
Amends 8c1b6d88c19633a7373c052a2af3f584ad2114f7.
Change-Id: I9f02c19d6993fa5b47bb07f361297fbe8c105749
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit ecc588bfbc15c1c344093601374e16c4e64dc075)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | testing/command.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/testing/command.py b/testing/command.py index 307a59761..2bed65070 100644 --- a/testing/command.py +++ b/testing/command.py @@ -261,14 +261,15 @@ def main(): key, value = things os.environ[key] = value + version = sys.version.replace("\n", " ") print( dedent( - """\ + f"""\ System: - Platform={sys.__dict__["platform"]} - Executable={sys.__dict__["executable"]} - Version={sys.version.replace("\n", " ")} - API version={sys.__dict__["api_version"]} + Platform={sys.platform} + Executable={sys.executable} + Version={version} + API version={sys.api_version} Environment:""" ) |