changed from list to string

This commit is contained in:
twangboy 2016-01-28 09:51:58 -07:00
parent f201c6e034
commit 956981b1f7

View File

@ -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