Commit a235d4dd authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

Bug #3976 : merge stdout and stderr in execute output

- merge standard outputs
- do not return a tuple
parent 4fcf7718
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
import os
import re
import psutil
from subprocess import Popen, PIPE
from subprocess import Popen, PIPE, STDOUT
from multiprocessing import cpu_count
from platform import platform, machine
from socket import gethostbyaddr, gethostname
@@ -252,11 +252,12 @@ class LocalHost(Host):
        output = None
        try:
            #FIXME: stop using shell=true and parse arguments with shlex.split()
            data = Popen(command, shell=True,
            data = Popen(command,
                         shell=True,
                         bufsize=-1,
                         stdin=PIPE,
                         stdout=PIPE,
                         stderr=PIPE).communicate()
                         stderr=STDOUT).communicate()[0]
            if data:
                output = data
        except: