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:
Kotresh HR 2018-10-29 18:08:28 +05:30 committed by Amar Tumballi
parent 0c835893fd
commit bae5841487

View File

@ -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