summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/netcmd/spn.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-10-13 00:36:44 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-10-13 05:06:52 +0200
commit88d997a63e93c4d0ed20e39a962d34b74c90b90c (patch)
tree610a283a9efa6172a45a5246a76b828dae4e4477 /source4/scripting/python/samba/netcmd/spn.py
parent0e70e26d927441260332941d8eeb506cf6f06e62 (diff)
downloadsamba-88d997a63e93c4d0ed20e39a962d34b74c90b90c.tar.gz
samba-88d997a63e93c4d0ed20e39a962d34b74c90b90c.tar.xz
samba-88d997a63e93c4d0ed20e39a962d34b74c90b90c.zip
samba-tool: Use self.outf in a few more places.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Thu Oct 13 05:06:52 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/scripting/python/samba/netcmd/spn.py')
-rw-r--r--source4/scripting/python/samba/netcmd/spn.py11
1 files changed, 7 insertions, 4 deletions
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)