From e6dfba23764fca4634a27d6b8be274fe0f779ea3 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Mon, 7 Oct 2019 12:30:53 +0200 Subject: [PATCH] packaging: use python3 compatible print Signed-off-by: Kyr Shatskyy --- teuthology/packaging.py | 4 ++-- teuthology/test/test_packaging.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/teuthology/packaging.py b/teuthology/packaging.py index a9912f4250..6477c97087 100644 --- a/teuthology/packaging.py +++ b/teuthology/packaging.py @@ -145,7 +145,7 @@ def get_koji_task_result(task_id, remote, ctx): """ py_cmd = ('import koji; ' 'hub = koji.ClientSession("{kojihub_url}"); ' - 'print hub.getTaskResult({task_id})') + 'print(hub.getTaskResult({task_id}))') py_cmd = py_cmd.format( task_id=task_id, kojihub_url=config.kojihub_url @@ -265,7 +265,7 @@ def get_koji_build_info(build_id, remote, ctx): """ py_cmd = ('import koji; ' 'hub = koji.ClientSession("{kojihub_url}"); ' - 'print hub.getBuild({build_id})') + 'print(hub.getBuild({build_id}))') py_cmd = py_cmd.format( build_id=build_id, kojihub_url=config.kojihub_url diff --git a/teuthology/test/test_packaging.py b/teuthology/test/test_packaging.py index dbca46dcac..c85d06e223 100644 --- a/teuthology/test/test_packaging.py +++ b/teuthology/test/test_packaging.py @@ -149,7 +149,7 @@ class TestPackaging(object): 'python', '-c', 'import koji; ' 'hub = koji.ClientSession("http://kojihub.com"); ' - 'print hub.getBuild(1)', + 'print(hub.getBuild(1))', ] assert expected_args == kwargs['args'] @@ -181,7 +181,7 @@ class TestPackaging(object): 'python', '-c', 'import koji; ' 'hub = koji.ClientSession("http://kojihub.com"); ' - 'print hub.getTaskResult(1)', + 'print(hub.getTaskResult(1))', ] assert expected_args == kwargs['args'] @@ -347,7 +347,7 @@ class TestBuilderProject(object): ) gp = self.klass("ceph", config) result = gp.base_url - print self.m_get.call_args_list + print(self.m_get.call_args_list) assert result == expected def test_init_from_config_branch_ref(self): -- 2.39.5