diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-08-12 13:44:11 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-09-01 11:42:01 +0200 |
commit | 8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e (patch) | |
tree | ac6435b79d3e540e907bcc88e3b1c534c2945626 /ipalib/messages.py | |
parent | fb7943dab454f358316160b4baf99075603a162d (diff) | |
download | freeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.tar.gz freeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.tar.xz freeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.zip |
Use the print function
In Python 3, `print` is no longer a statement. Call it as a function
everywhere, and include the future import to remove the statement
in Python 2 code as well.
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipalib/messages.py')
-rw-r--r-- | ipalib/messages.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipalib/messages.py b/ipalib/messages.py index 853979506..da8f740be 100644 --- a/ipalib/messages.py +++ b/ipalib/messages.py @@ -29,6 +29,7 @@ range, so that it does not clash with PublicError numbers. Messages also have the 'type' argument, set to one of 'debug', 'info', 'warning', 'error'. This determines the severity of themessage. """ +from __future__ import print_function from inspect import isclass @@ -258,8 +259,8 @@ public_messages = tuple(sorted( def print_report(label, classes): for cls in classes: - print '%d\t%s' % (cls.errno, cls.__name__) - print '(%d %s)' % (len(classes), label) + print('%d\t%s' % (cls.errno, cls.__name__)) + print('(%d %s)' % (len(classes), label)) if __name__ == '__main__': print_report('public messages', public_messages) |