|
|
@ -149,9 +149,11 @@ def command(data):
|
|
|
|
return dict(failed=True, msg='internal error: cmd is required')
|
|
|
|
return dict(failed=True, msg='internal error: cmd is required')
|
|
|
|
if 'tmp_path' not in data:
|
|
|
|
if 'tmp_path' not in data:
|
|
|
|
return dict(failed=True, msg='internal error: tmp_path is required')
|
|
|
|
return dict(failed=True, msg='internal error: tmp_path is required')
|
|
|
|
|
|
|
|
if 'executable' not in data:
|
|
|
|
|
|
|
|
return dict(failed=True, msg='internal error: executable is required')
|
|
|
|
|
|
|
|
|
|
|
|
log("executing: %s" % data['cmd'])
|
|
|
|
log("executing: %s" % data['cmd'])
|
|
|
|
p = subprocess.Popen(data['cmd'], shell=True, stdout=subprocess.PIPE, close_fds=True)
|
|
|
|
p = subprocess.Popen(data['cmd'], executable=data['executable'], shell=True, stdout=subprocess.PIPE, close_fds=True)
|
|
|
|
(stdout, stderr) = p.communicate()
|
|
|
|
(stdout, stderr) = p.communicate()
|
|
|
|
if stdout is None:
|
|
|
|
if stdout is None:
|
|
|
|
stdout = ''
|
|
|
|
stdout = ''
|
|
|
|