From 88d997a63e93c4d0ed20e39a962d34b74c90b90c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 13 Oct 2011 00:36:44 +0200 Subject: samba-tool: Use self.outf in a few more places. Autobuild-User: Jelmer Vernooij Autobuild-Date: Thu Oct 13 05:06:52 CEST 2011 on sn-devel-104 --- source4/scripting/python/samba/netcmd/spn.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source4/scripting/python/samba/netcmd/spn.py') diff --git a/source4/scripting/python/samba/netcmd/spn.py b/source4/scripting/python/samba/netcmd/spn.py index 6c36f6ca4c7..614710c973c 100644 --- a/source4/scripting/python/samba/netcmd/spn.py +++ b/source4/scripting/python/samba/netcmd/spn.py @@ -50,7 +50,7 @@ class cmd_spn_list(Command): # TODO once I understand how, use the domain info to naildown # to the correct domain (cleaneduser, realm, domain) = _get_user_realm_domain(user) - print cleaneduser + self.outf.write(cleaneduser+"\n") res = sam.search(expression="samaccountname=%s" % ldb.binary_encode(cleaneduser), scope=ldb.SCOPE_SUBTREE, attrs=["servicePrincipalName"]) @@ -59,11 +59,14 @@ class cmd_spn_list(Command): found = False flag = ldb.FLAG_MOD_ADD if spns != None: - print "User %s has the following servicePrincipalName: " % str(res[0].dn) + self.outf.write( + "User %s has the following servicePrincipalName: \n" % + res[0].dn) for e in spns: - print "\t %s" % (str(e)) + self.outf.write("\t %s\n" % e) else: - print "User %s has no servicePrincipalName" % str(res[0].dn) + self.outf.write("User %s has no servicePrincipalName" % + res[0].dn) else: raise CommandError("User %s not found" % user) -- cgit