1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

samba-tool processes: Remove unused loop

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Joseph Sutton 2022-05-05 20:41:26 +12:00 committed by Andreas Schneider
parent f9df57043e
commit 2fb3658eda

View File

@ -68,21 +68,20 @@ class cmd_processes(Command):
masters = {}
workers = {}
for service in services:
for id in service.ids:
if service.name.startswith("prefork-master"):
ns = service.name.split("-")
name = ns[2] + "_server"
masters[name] = service.ids[0].pid
elif service.name.startswith("prefork-worker"):
ns = service.name.split("-")
name = ns[2] + "_server"
instance = int(ns[3])
pid = service.ids[0].pid
if name not in workers:
workers[name] = {}
workers[name][instance] = (instance, pid)
else:
filtered.append(service)
if service.name.startswith("prefork-master"):
ns = service.name.split("-")
name = ns[2] + "_server"
masters[name] = service.ids[0].pid
elif service.name.startswith("prefork-worker"):
ns = service.name.split("-")
name = ns[2] + "_server"
instance = int(ns[3])
pid = service.ids[0].pid
if name not in workers:
workers[name] = {}
workers[name][instance] = (instance, pid)
else:
filtered.append(service)
return (filtered, masters, workers)
def run(self, sambaopts, versionopts, section_name=None,