From: Zack Cerza Date: Fri, 9 May 2014 14:24:22 +0000 (-0500) Subject: Use binary flag for paramiko ChannelFiles X-Git-Tag: 1.1.0~1481 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd7f268d9dc72617b4c99623686f38346dbbe83e;p=teuthology.git Use binary flag for paramiko ChannelFiles This works around http://tracker.ceph.com/issues/8313 Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/run.py b/teuthology/orchestra/run.py index f7e4d4823..547b8cadd 100644 --- a/teuthology/orchestra/run.py +++ b/teuthology/orchestra/run.py @@ -2,6 +2,7 @@ Paramiko run support """ from cStringIO import StringIO +from paramiko import ChannelFile import gevent import gevent.event @@ -114,6 +115,10 @@ def copy_to_log(f, logger, host, loglevel=logging.INFO): """ Interface to older xreadlines api. """ + # Work-around for http://tracker.ceph.com/issues/8313 + if isinstance(f, ChannelFile): + f._flags += ChannelFile.FLAG_BINARY + # i can't seem to get fudge to fake an iterable, so using this old # api for now for line in f.xreadlines():