]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
copy_to_log(): Drop use of readlines() 947/head
authorZack Cerza <zack@redhat.com>
Thu, 1 Sep 2016 15:11:28 +0000 (09:11 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 1 Sep 2016 15:15:12 +0000 (09:15 -0600)
commit3c12d9a32ed82e15ae8c25b00f8fc612ce64b303
tree7604a57e22e4f871aba4d22da9642030353c86e8
parent0cd6e75e8b0c79ebc63d3291daa9c885e13ef3b5
copy_to_log(): Drop use of readlines()

http://tracker.ceph.com/issues/17102
Fixes: 17102
Calling readlines() on the source object causes the teuthology thread to
block on the remote command's execution. Instead, iterate over the
source object as advised at:
https://docs.python.org/2.7/library/stdtypes.html#file.xreadlines

This interface is also supported by StringIO and cStringIO.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/orchestra/run.py