summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/components.py
diff options
context:
space:
mode:
authorChristoph Erhardt <kolab@sicherha.de>2021-06-04 16:50:46 +0200
committerChristoph Erhardt <kolab@sicherha.de>2022-01-10 20:42:16 +0100
commitd0579b7e5da331576b80b9d35eb62994075bc939 (patch)
treee925558aabd8a69217e828c46eb4111d16f00fd4 /pykolab/setup/components.py
parent7750671314e6da19f65aaa95bb1095963fdc175a (diff)
downloadpykolab-d0579b7e5da331576b80b9d35eb62994075bc939.tar.gz
[Python 3] Use print() as function instead of statement
Summary: print() has been a function since Python 2.6; the old behaviour was dropped in Python 3.0. To use the named file argument in Python 2, we need to import print_function from the __future__ module. Reviewers: machniak, mollekopf Reviewed By: mollekopf Differential Revision: https://git.kolab.org/D3229
Diffstat (limited to 'pykolab/setup/components.py')
-rw-r--r--pykolab/setup/components.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pykolab/setup/components.py b/pykolab/setup/components.py
index a9adbfa..8e9f346 100644
--- a/pykolab/setup/components.py
+++ b/pykolab/setup/components.py
@@ -80,21 +80,21 @@ def list_components(*args, **kw):
if __components[_component].has_key('function'):
# This is a top-level component
if not __components[_component]['description'] == None:
- print "%-25s - %s" % (_component.replace('_','-'),__components[_component]['description'])
+ print("%-25s - %s" % (_component.replace('_','-'),__components[_component]['description']))
else:
- print "%-25s" % (_component.replace('_','-'))
+ print("%-25s" % (_component.replace('_','-')))
for _component in _components:
if not __components[_component].has_key('function'):
# This is a nested component
- print "\n" + _("Command Group: %s") % (_component) + "\n"
+ print("\n" + _("Command Group: %s") % (_component) + "\n")
___components = __components[_component].keys()
___components.sort()
for __component in ___components:
if not __components[_component][__component]['description'] == None:
- print "%-4s%-21s - %s" % ('',__component.replace('_','-'),__components[_component][__component]['description'])
+ print("%-4s%-21s - %s" % ('',__component.replace('_','-'),__components[_component][__component]['description']))
else:
- print "%-4s%-21s" % ('',__component.replace('_','-'))
+ print("%-4s%-21s" % ('',__component.replace('_','-')))
def _list_components(*args, **kw):
"""
@@ -262,5 +262,5 @@ def register(component_name, func, group=None, description=None, aliases=[], aft
##
def not_yet_implemented(*args, **kw):
- print _("Not yet implemented")
+ print(_("Not yet implemented"))
sys.exit(1)