diff options
author | Kotresh HR <khiremat@redhat.com> | 2018-10-29 18:08:28 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-10-30 05:55:33 +0000 |
commit | bae584148761ad98cd3d5c380f8cea1ff83aa8c3 (patch) | |
tree | d09e8e08167c1862e928ba71f4d6bcdcbb5b7e88 /extras/cliutils | |
parent | 0c835893fdce59872103253985d152f4592eea89 (diff) |
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>
Diffstat (limited to 'extras/cliutils')
-rw-r--r-- | extras/cliutils/cliutils.py | 3 |
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 |