cliutils: python2 to python3 compat
Make Popen py2 and py3 compatiable fixes: bz#1643935 Change-Id: Ife34cb38024dcdc0420436e7d76fd208223f9d86 Signed-off-by: Kotresh HR <khiremat@redhat.com>
This commit is contained in:
parent
0c835893fd
commit
bae5841487
@ -71,7 +71,8 @@ def node_output_notok(message):
|
||||
|
||||
|
||||
def execute(cmd):
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
out, err = p.communicate()
|
||||
return p.returncode, out, err
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user