From 3037ce79a1d33595e3a6d72fe22eba027deba2ea Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 15 Aug 2022 08:34:13 +1000 Subject: zuul_console: do not use f-strings In Ief366c092e05fb88351782f6d9cd280bfae96237 I missed that this runs in the context of the remote node; meaning that it must support all the Python versions that might run there. f-strings are not 3.5 compatible. I'm thinking about how to lint this better (a syntax check run?) Change-Id: Ia4133b061800791196cd631f2e6836cb77347664 --- zuul/ansible/base/library/zuul_console.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zuul/ansible/base/library/zuul_console.py b/zuul/ansible/base/library/zuul_console.py index bd23d5f49..bc35e47db 100755 --- a/zuul/ansible/base/library/zuul_console.py +++ b/zuul/ansible/base/library/zuul_console.py @@ -185,7 +185,8 @@ class Server(object): # NOTE(ianw) : remote sends its version. We currently # don't have anything to do with this value, so ignore # for now. - conn.send(f'{ZUUL_CONSOLE_PROTO_VERSION}\n'.encode('utf-8')) + cmd = '%s\n' % (ZUUL_CONSOLE_PROTO_VERSION) + conn.send(cmd.encode('utf-8')) continue elif command.startswith('s:'): log_uuid = command[2:] -- cgit v1.2.1