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.
This commit is contained in:
parent
d85976aa08
commit
7149380ff9
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue