summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/netcmd/processes.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/scripting/python/samba/netcmd/processes.py b/source4/scripting/python/samba/netcmd/processes.py
index 751ab94c21..b25a2e453e 100644
--- a/source4/scripting/python/samba/netcmd/processes.py
+++ b/source4/scripting/python/samba/netcmd/processes.py
@@ -62,17 +62,17 @@ class cmd_processes(Command):
if name is not None:
ids = msg_ctx.irpc_servers_byname(name)
for server_id in ids:
- print "%d\n" % server_id.pid
+ self.outf.write("%d\n" % server_id.pid)
elif pid is not None:
names = msg_ctx.irpc_all_servers()
for name in names:
for server_id in name.ids:
if server_id.pid == int(pid):
- print "%s\n" % name.name
+ self.outf.write("%s\n" % name.name)
else:
names = msg_ctx.irpc_all_servers()
+ self.outf.write(" Service: PID \n")
+ self.outf.write("-----------------------------\n")
for name in names:
- print "%s: " % name.name
for server_id in name.ids:
- print "%d " % server_id.pid
- print "\n"
+ self.outf.write("%-16s %6d\n" % (name.name, server_id.pid))