From 36b2732d50cedfe0bbbb8cba87506c72cd547c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Linse?= Date: Thu, 18 Aug 2016 12:25:26 +0200 Subject: [PATCH] asyncio: use stderr fd constant sys.stderr might be monkey-patched by other library, and not always work. also it gives the impression the stderr stream of the python process is used which it isn't. --- neovim/msgpack_rpc/event_loop/asyncio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neovim/msgpack_rpc/event_loop/asyncio.py b/neovim/msgpack_rpc/event_loop/asyncio.py index 87ce79a4..1b281354 100644 --- a/neovim/msgpack_rpc/event_loop/asyncio.py +++ b/neovim/msgpack_rpc/event_loop/asyncio.py @@ -59,7 +59,7 @@ def pipe_connection_lost(self, fd, exc): def pipe_data_received(self, fd, data): """Used to signal `asyncio.SubprocessProtocol` of incoming data.""" - if fd == sys.stderr.fileno(): + if fd == 2: # stderr fd number self._on_stderr(data) elif self._on_data: self._on_data(data)