From 625e2fdebc09c4717aed031166336399274ea54d Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 25 Jan 2022 08:31:17 -0500 Subject: [PATCH] TT#14008 fix websockets test for older python3 Don't use f'' strings and use .group() instead of [] for RE substring matches. Closes #1433 Change-Id: I464c6eb063702c90c2308598927e7db8358703d1 (cherry picked from commit 54ee9277733a520a273c3c5ebd7ad0bc8df650ba) --- t/auto-daemon-tests-websocket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/auto-daemon-tests-websocket.py b/t/auto-daemon-tests-websocket.py index 65cab61b3..0d194e837 100644 --- a/t/auto-daemon-tests-websocket.py +++ b/t/auto-daemon-tests-websocket.py @@ -942,7 +942,7 @@ class TestVideoroom(unittest.TestCase): ) self.assertRegex(sdp, match_re) matches = match_re.search(sdp) - port = int(matches[1]) + port = int(matches.group(1)) self.assertEqual( self._res, { @@ -2071,5 +2071,5 @@ if __name__ == "__main__": os.unlink(so.name) os.unlink(se.name) else: - print(f"HINT: Stdout and stderr are {so.name} and {se.name}") + print("HINT: Stdout and stderr are {} and {}".format(so.name, se.name)) sys.exit(code)