summaryrefslogtreecommitdiffstats
path: root/ipaserver/install
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-09-18 11:35:57 +0200
committerRob Crittenden <rcritten@redhat.com>2012-10-04 22:15:28 -0400
commit503e03bf9623dde24ae0a97ba33079f10495e868 (patch)
treebbd28e5dd2b477f96e09b1182890ce9bfe807010 /ipaserver/install
parentfdd3299fa8470a93ea42b403b4117c15262eb90f (diff)
downloadfreeipa-503e03bf9623dde24ae0a97ba33079f10495e868.tar.gz
freeipa-503e03bf9623dde24ae0a97ba33079f10495e868.tar.xz
freeipa-503e03bf9623dde24ae0a97ba33079f10495e868.zip
ipa-adtrust-install: replace print with self.print_msg
https://fedorahosted.org/freeipa/ticket/3019
Diffstat (limited to 'ipaserver/install')
-rw-r--r--ipaserver/install/adtrustinstance.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index 09b718226..79503c46e 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -155,25 +155,25 @@ class ADTRUSTInstance(service.Service):
dom_entry = self.admin_conn.getEntry(self.smb_dom_dn, \
ldap.SCOPE_BASE)
except errors.NotFound:
- print "Samba domain object not found"
+ self.print_msg("Samba domain object not found")
return
dom_sid = dom_entry.getValue(self.ATTR_SID)
if not dom_sid:
- print "Samba domain object does not have a SID"
+ self.print_msg("Samba domain object does not have a SID")
return
try:
admin_entry = self.admin_conn.getEntry(admin_dn, ldap.SCOPE_BASE)
except:
- print "IPA admin object not found"
+ self.print_msg("IPA admin object not found")
return
try:
admin_group_entry = self.admin_conn.getEntry(admin_group_dn, \
ldap.SCOPE_BASE)
except:
- print "IPA admin group object not found"
+ self.print_msg("IPA admin group object not found")
return
if admin_entry.getValue(self.ATTR_SID):
@@ -283,13 +283,13 @@ class ADTRUSTInstance(service.Service):
if res[0].getValue('ipaBaseRID') or \
res[0].getValue('ipaSecondaryBaseRID'):
- print "RID bases already set, nothing to do"
+ self.print_msg("RID bases already set, nothing to do")
return
size = res[0].getValue('ipaIDRangeSize')
if abs(self.rid_base - self.secondary_rid_base) > size:
- print "Primary and secondary RID base are too close. " \
- "They have to differ at least by %d." % size
+ self.print_msg("Primary and secondary RID base are too close. " \
+ "They have to differ at least by %d." % size)
raise RuntimeError("RID bases too close.\n")
try:
@@ -299,7 +299,7 @@ class ADTRUSTInstance(service.Service):
(ldap.MOD_ADD, "ipaSecondaryBaseRID", \
str(self.secondary_rid_base))])
except:
- print "Failed to add RID bases to the local range object"
+ self.print_msg("Failed to add RID bases to the local range object")
except errors.NotFound as e:
root_logger.critical("ID range of the local domain not found, " \
@@ -326,8 +326,8 @@ class ADTRUSTInstance(service.Service):
try:
name = new_dn[1].attr
except Exception, e:
- print 'Cannot extract RDN attribute value from "%s": %s' % \
- (new_dn, e)
+ self.print_msg('Cannot extract RDN attribute value from "%s": %s' % \
+ (new_dn, e))
return
entry.setValues("cn", name)
self.admin_conn.addEntry(entry)
@@ -444,12 +444,12 @@ class ADTRUSTInstance(service.Service):
"as it is not defined in IPA" % zone
if err_msg:
- print err_msg
- print "Add the following service records to your DNS server " \
- "for DNS zone %s: " % zone
+ self.print_msg(err_msg)
+ self.print_msg("Add the following service records to your DNS " \
+ "server for DNS zone %s: " % zone)
for (srv, rdata) in ipa_srv_rec:
for suff in win_srv_suffix:
- print " - %s%s" % (srv, suff)
+ self.print_msg(" - %s%s" % (srv, suff))
return
for (srv, rdata) in ipa_srv_rec: