mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Prefer subprocess.Popen
for now
This commit is contained in:
parent
20adbd725a
commit
a22a3af684
1 changed files with 4 additions and 3 deletions
|
@ -369,15 +369,16 @@ def run(opts):
|
|||
print('Running CMD: {0}'.format(cmd))
|
||||
sys.stdout.flush()
|
||||
|
||||
proc = NonBlockingPopen(
|
||||
proc = subprocess.Popen(
|
||||
cmd,
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
stream_stds=True
|
||||
)
|
||||
proc.poll_and_read_until_finish()
|
||||
stdout, _ = proc.communicate()
|
||||
|
||||
if stdout:
|
||||
print(stdout)
|
||||
sys.stdout.flush()
|
||||
|
||||
retcode = proc.returncode
|
||||
|
|
Loading…
Add table
Reference in a new issue