summaryrefslogtreecommitdiffstats
path: root/ipapython/dn.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-08-12 13:44:11 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-01 11:42:01 +0200
commit8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e (patch)
treeac6435b79d3e540e907bcc88e3b1c534c2945626 /ipapython/dn.py
parentfb7943dab454f358316160b4baf99075603a162d (diff)
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 'ipapython/dn.py')
-rw-r--r--ipapython/dn.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipapython/dn.py b/ipapython/dn.py
index 640be72c3..a3b20121a 100644
--- a/ipapython/dn.py
+++ b/ipapython/dn.py
@@ -417,6 +417,7 @@ It is possible to "copy" an object by passing an object of the same type
to the constructor. The result may share underlying structure.
'''
+from __future__ import print_function
import sys
@@ -1121,8 +1122,8 @@ class DN(object):
try:
return dn2str(self.rdns)
except Exception, e:
- print len(self.rdns)
- print self.rdns
+ print(len(self.rdns))
+ print(self.rdns)
raise
def __repr__(self):