summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@jelmer.uk>2018-06-15 15:56:22 +0100
committerRobert Collins <robertc@robertcollins.net>2018-06-16 09:04:59 +1200
commit13d6aaa40c297e721209b29a9a08f9229462daab (patch)
treef8feab172ae3362587498b9e380c8dca0a6cd21a
parent8dd10641f45b519e1f533220bbc088440a5eb585 (diff)
downloadsubunit-git-13d6aaa40c297e721209b29a9a08f9229462daab.tar.gz
Rely on file.__iter__ rather than file.readlines.
-rw-r--r--python/subunit/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py
index b3b198c..81b773c 100644
--- a/python/subunit/__init__.py
+++ b/python/subunit/__init__.py
@@ -579,10 +579,10 @@ class TestProtocolServer(object):
def readFrom(self, pipe):
"""Blocking convenience API to parse an entire stream.
- :param pipe: A file-like object supporting readlines().
+ :param pipe: A file-like object supporting __iter__.
:return: None.
"""
- for line in pipe.readlines():
+ for line in pipe:
self.lineReceived(line)
self.lostConnection()