mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
parent
e254cbc764
commit
35c397d14b
@ -408,7 +408,10 @@ def _run(cmd,
|
||||
try:
|
||||
proc = salt.utils.timed_subprocess.TimedProc(cmd, **kwargs)
|
||||
except (OSError, IOError) as exc:
|
||||
raise CommandExecutionError('Unable to run command "{0}" with the context "{1}", reason: {2}'.format(cmd, kwargs, exc))
|
||||
raise CommandExecutionError(
|
||||
'Unable to run command {0!r} with the context {1!r}, reason: {2}'
|
||||
.format(cmd, kwargs, exc)
|
||||
)
|
||||
|
||||
try:
|
||||
proc.wait(timeout)
|
||||
@ -582,7 +585,7 @@ def run(cmd,
|
||||
if 'child_pids' in jid_dict:
|
||||
jid_dict['child_pids'].append(ret['pid'])
|
||||
else:
|
||||
jid_dict['child_pids'] = list(ret['pid'])
|
||||
jid_dict['child_pids'] = [ret['pid']]
|
||||
# Rewrite file
|
||||
with salt.utils.fopen(jid_file, 'w+') as fn_:
|
||||
fn_.write(serial.dumps(jid_dict))
|
||||
|
@ -42,7 +42,7 @@ else:
|
||||
STUB_DISK_USAGE,
|
||||
STUB_NETWORK_IO,
|
||||
STUB_DISK_IO,
|
||||
STUB_USER) = [None for val in range(7)]
|
||||
STUB_USER) = [None for val in range(9)]
|
||||
|
||||
STUB_PID_LIST = [0, 1, 2, 3]
|
||||
MOCK_PROC = mocked_proc = MagicMock('psutil.Process')
|
||||
|
Loading…
Reference in New Issue
Block a user