Skip to content

Commit 36b2732

Browse files
committed
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.
1 parent 4280e49 commit 36b2732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neovim/msgpack_rpc/event_loop/asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def pipe_connection_lost(self, fd, exc):
5959

6060
def pipe_data_received(self, fd, data):
6161
"""Used to signal `asyncio.SubprocessProtocol` of incoming data."""
62-
if fd == sys.stderr.fileno():
62+
if fd == 2: # stderr fd number
6363
self._on_stderr(data)
6464
elif self._on_data:
6565
self._on_data(data)

0 commit comments

Comments
 (0)