mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
changed from list to string
This commit is contained in:
parent
f201c6e034
commit
956981b1f7
@ -196,12 +196,15 @@ def status(name):
|
||||
cmd = ['launchctl', 'list']
|
||||
output = __salt__['cmd.run_stdout'](cmd)
|
||||
|
||||
pids = []
|
||||
pids = ''
|
||||
for line in output.splitlines():
|
||||
if 'PID' in line:
|
||||
continue
|
||||
if re.search(name, line):
|
||||
pids.append(line.split()[0])
|
||||
if isinstance(line.split()[0], int):
|
||||
if pids:
|
||||
pids += '\n'
|
||||
pids += line.split()[0]
|
||||
|
||||
return pids
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user