From 8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 12 Aug 2015 13:44:11 +0200 Subject: 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 Reviewed-By: Jan Cholasta --- ipapython/dn.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ipapython/dn.py') 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): -- cgit