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

index 672a42548cd2cdfca4efe92d910883cb051095f3..a1165beccacc778aad25cc902b815e7aeb741f8f 100644 (file)
@@ -109,17 +109,17 @@ class JobPrinter(JobProcessor):
         job_priority = job_config['priority']
         job_name = job_config['name']
         job_desc = job_config['description']
-        print 'Job: {i:>4} priority: {pri:>4} {job_name}/{job_id}'.format(
+        print('Job: {i:>4} priority: {pri:>4} {job_name}/{job_id}'.format(
             i=job_index,
             pri=job_priority,
             job_id=job_id,
             job_name=job_name,
-            )
+            ))
         if self.full:
             pprint.pprint(job_config)
         elif job_desc and self.show_desc:
             for desc in job_desc.split():
-                print '\t {desc}'.format(desc=desc)
+                print('\t {}'.format(desc))
 
 
 class RunPrinter(JobProcessor):
@@ -131,7 +131,7 @@ class RunPrinter(JobProcessor):
         run = self.jobs[job_id]['job_config']['name']
         if run not in self.runs:
             self.runs.append(run)
-            print run
+            print(run)
 
 
 class JobDeleter(JobProcessor):
@@ -147,10 +147,10 @@ class JobDeleter(JobProcessor):
     def process_job(self, job_id):
         job_config = self.jobs[job_id]['job_config']
         job_name = job_config['name']
-        print 'Deleting {job_name}/{job_id}'.format(
+        print('Deleting {job_name}/{job_id}'.format(
             job_id=job_id,
             job_name=job_name,
-            )
+            ))
         job_obj = self.jobs[job_id].get('job_obj')
         if job_obj:
             job_obj.delete()
@@ -196,7 +196,7 @@ def main(args):
             # it is not needed for pausing tubes
             watch_tube(connection, machine_type)
         if status:
-            print stats_tube(connection, machine_type)
+            print(stats_tube(connection, machine_type))
         elif pause_duration:
             pause_tube(connection, machine_type, pause_duration)
         elif delete: