summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/httpinstance.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 /ipaserver/install/httpinstance.py
parentfb7943dab454f358316160b4baf99075603a162d (diff)
downloadfreeipa-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 'ipaserver/install/httpinstance.py')
-rw-r--r--ipaserver/install/httpinstance.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index 196efb05e..9354a22f5 100644
--- a/ipaserver/install/httpinstance.py
+++ b/ipaserver/install/httpinstance.py
@@ -17,6 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import print_function
+
import os
import os.path
import tempfile
@@ -213,7 +215,7 @@ class HTTPInstance(service.Service):
def __set_mod_nss_port(self):
self.fstore.backup_file(paths.HTTPD_NSS_CONF)
if installutils.update_file(paths.HTTPD_NSS_CONF, '8443', '443') != 0:
- print "Updating port in %s failed." % paths.HTTPD_NSS_CONF
+ print("Updating port in %s failed." % paths.HTTPD_NSS_CONF)
def __set_mod_nss_nickname(self, nickname):
installutils.set_directive(paths.HTTPD_NSS_CONF, 'NSSNickname', nickname)
@@ -231,7 +233,7 @@ class HTTPInstance(service.Service):
def __add_include(self):
"""This should run after __set_mod_nss_port so is already backed up"""
if installutils.update_file(paths.HTTPD_NSS_CONF, '</VirtualHost>', 'Include conf.d/ipa-rewrite.conf\n</VirtualHost>') != 0:
- print "Adding Include conf.d/ipa-rewrite to %s failed." % paths.HTTPD_NSS_CONF
+ print("Adding Include conf.d/ipa-rewrite to %s failed." % paths.HTTPD_NSS_CONF)
def configure_certmonger_renewal_guard(self):
certmonger = services.knownservices.certmonger