diff options
author | Claudiu Belu <bclau@users.noreply.github.com> | 2017-03-02 18:29:52 +0200 |
---|---|---|
committer | Free Ekanayaka <free@ekanayaka.io> | 2017-03-02 17:29:52 +0100 |
commit | 7149380ff9a4f77f523b4b82e88b22c4e55a77a6 (patch) | |
tree | d4f5f39a4f5874411e5c6248c10ad81f89c2f08c /python | |
parent | d85976aa08e3c42e7376c341adefbfa32e30c66c (diff) | |
download | subunit-git-7149380ff9a4f77f523b4b82e88b22c4e55a77a6.tar.gz |
Fallback to reading one-byte-at-a-time on Windows (#22)
select.select does not work on file descriptors on Windows, causing subunit to fail.
Diffstat (limited to 'python')
-rw-r--r-- | python/subunit/v2.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/subunit/v2.py b/python/subunit/v2.py index 9ff139c..254617c 100644 --- a/python/subunit/v2.py +++ b/python/subunit/v2.py @@ -309,6 +309,11 @@ class ByteStreamToStreamResult(object): # annoying). buffered = [content] while len(buffered[-1]): + # Note: Windows does not support passing a file descriptor to + # select.select. fallback to one-byte-at-a-time. + if sys.platform == 'win32': + break + try: self.source.fileno() except: |