Use Python 3 print function

This is updated in all files for consistency, even the modules that will
never be ported to Py 3 completely due to dependency on Yum.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-08-23 09:39:17 +02:00
parent c14c28a157
commit ec39514fba
6 changed files with 35 additions and 24 deletions

View file

@ -36,6 +36,8 @@ To print profiling data, run:
Profiler.print_results()
"""
from __future__ import print_function
import functools
import time
@ -65,8 +67,8 @@ class Profiler(object):
@classmethod
def print_results(cls):
print "Profiling results:"
print("Profiling results:")
results = cls._data.items()
results.sort(lambda x, y: cmp(x[1]["time"], y[1]["time"]), reverse=True)
for name, data in results:
print " %6.2f %5d %s" % (data["time"], data["calls"], name)
print(" %6.2f %5d %s" % (data["time"], data["calls"], name))