Skip to content

Commit 2cb624e

Browse files
committed
Merge pull request #167 from maxwell-k/master
Don't use BaseException.message
2 parents e3a1395 + 2db6bee commit 2cb624e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neovim/msgpack_rpc/event_loop/asyncio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def connection_made(self, transport):
4444

4545
def connection_lost(self, exc):
4646
"""Used to signal `asyncio.Protocol` of a lost connection."""
47-
self._on_error(exc.message if exc else 'EOF')
47+
self._on_error(exc.args[0] if exc else 'EOF')
4848

4949
def data_received(self, data):
5050
"""Used to signal `asyncio.Protocol` of incoming data."""
@@ -55,7 +55,7 @@ def data_received(self, data):
5555

5656
def pipe_connection_lost(self, fd, exc):
5757
"""Used to signal `asyncio.SubprocessProtocol` of a lost connection."""
58-
self._on_error(exc.message if exc else 'EOF')
58+
self._on_error(exc.args[0] if exc else 'EOF')
5959

6060
def pipe_data_received(self, fd, data):
6161
"""Used to signal `asyncio.SubprocessProtocol` of incoming data."""

0 commit comments

Comments
 (0)