summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-10-29 18:08:28 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-11-08 14:31:40 +0000
commitc10803f9712a8bc2ac18b71189dca4b7fc80d25e (patch)
tree5900f64d47d9a8ed1478d0eefb21bd026641af6a
parent7072841fbd82fc14c48ced8eba18ee6626632660 (diff)
cliutils: python2 to python3 compat
Make Popen py2 and py3 compatiable Backport of: > BUG: 1643935 > Change-Id: Ife34cb38024dcdc0420436e7d76fd208223f9d86 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit bae584148761ad98cd3d5c380f8cea1ff83aa8c3) fixes: bz#1644161 Change-Id: Ife34cb38024dcdc0420436e7d76fd208223f9d86 Signed-off-by: Kotresh HR <khiremat@redhat.com>
-rw-r--r--extras/cliutils/cliutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/cliutils/cliutils.py b/extras/cliutils/cliutils.py
index d805ac6d100..0095586827d 100644
--- a/extras/cliutils/cliutils.py
+++ b/extras/cliutils/cliutils.py
@@ -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