From 6adea5fa5cacc9f361701a4981513623163a1a0c Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Fri, 10 Feb 2023 14:55:24 -0800 Subject: [PATCH] [stable-2.14] ansible-test - fix warning to include image name (#79560) (#79973) (cherry picked from commit 0a12d8a5bc820e5d12805af41b80351d0b635e63) Co-authored-by: Martin Krizek --- changelogs/fragments/ansible-test-fix-warning-msg.yml | 2 ++ test/lib/ansible_test/_internal/containers.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/ansible-test-fix-warning-msg.yml diff --git a/changelogs/fragments/ansible-test-fix-warning-msg.yml b/changelogs/fragments/ansible-test-fix-warning-msg.yml new file mode 100644 index 00000000000..b6b6d483861 --- /dev/null +++ b/changelogs/fragments/ansible-test-fix-warning-msg.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - fix warning message about failing to run an image to include the image name diff --git a/test/lib/ansible_test/_internal/containers.py b/test/lib/ansible_test/_internal/containers.py index 95b1718b3ef..de4a380c47d 100644 --- a/test/lib/ansible_test/_internal/containers.py +++ b/test/lib/ansible_test/_internal/containers.py @@ -263,7 +263,7 @@ def run_container( stdout = docker_run(args, image, options, cmd)[0] except SubprocessError as ex: display.error(ex.message) - display.warning('Failed to run docker image "{image}". Waiting a few seconds before trying again.') + display.warning(f'Failed to run docker image "{image}". Waiting a few seconds before trying again.') docker_rm(args, name) # podman doesn't remove containers after create if run fails time.sleep(3) else: