]> git-server-git.apps.pok.os.sepia.ceph.com Git - remoto.git/commitdiff
Fix output splitting for Python 3
authorOleh Prypin <oleh@pryp.in>
Fri, 6 May 2016 11:35:58 +0000 (14:35 +0300)
committerOleh Prypin <oleh@pryp.in>
Fri, 6 May 2016 11:35:58 +0000 (14:35 +0300)
remoto/process.py

index 38bc5a24bb1524ff7cdd6f8e38bcb0b3cbd5b47e..c604b8f355293738eb6549e93fbec3aa8798fc1c 100644 (file)
@@ -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()))