]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
packaging: use python3 compatible print
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 7 Oct 2019 10:30:53 +0000 (12:30 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 7 Oct 2019 10:30:53 +0000 (12:30 +0200)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/packaging.py
teuthology/test/test_packaging.py

index a9912f42500cbb663208e05e384df3a66d9ad084..6477c970873d62ec8f270fefebce78fed3b51d79 100644 (file)
@@ -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
index dbca46dcac758e4db8c36c111a58838d1e434a51..c85d06e2231dcc248f64100b75e7a075e787ca8f 100644 (file)
@@ -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):