From: Oleh Prypin Date: Fri, 6 May 2016 11:35:58 +0000 (+0300) Subject: Fix output splitting for Python 3 X-Git-Tag: 0.0.28~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=76f271d0198d88ed62888ebd8603dc27ee1538e3;p=remoto.git Fix output splitting for Python 3 --- diff --git a/remoto/process.py b/remoto/process.py index 38bc5a2..c604b8f 100644 --- a/remoto/process.py +++ b/remoto/process.py @@ -139,8 +139,8 @@ def _remote_check(channel, cmd, **kw): process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kw ) - stdout = [line.strip('\n') for line in process.stdout.readlines()] - stderr = [line.strip('\n') for line in process.stderr.readlines()] + stdout = process.stdout.read().splitlines() + stderr = process.stderr.read().splitlines() channel.send((stdout, stderr, process.wait()))