Skip to content

Commit

Permalink
Force NonFileStreamReader on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Michel committed Jun 1, 2017
1 parent 6e698ff commit cff3420
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aioconsole/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ def open_pipe_connection(pipe_in, pipe_out, *, loop=None):
@asyncio.coroutine
def create_standard_streams(stdin, stdout, loop):
try:
if sys.platform == 'win32':
raise OSError
sys.stdin.fileno(), sys.stdout.fileno()
except io.UnsupportedOperation:
except OSError:
reader = NonFileStreamReader(stdin, loop=loop)
writer = NonFileStreamWriter(stdout, loop=loop)
else:
Expand Down

0 comments on commit cff3420

Please sign in to comment.