From 95d3457574776c2ac525b060f30a5af99adad9d4 Mon Sep 17 00:00:00 2001 From: dongweiming Date: Sat, 28 Dec 2019 21:31:19 +0800 Subject: [PATCH] Fix #454 --- aiomysql/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiomysql/connection.py b/aiomysql/connection.py index 32da048c..8bf5cbf4 100644 --- a/aiomysql/connection.py +++ b/aiomysql/connection.py @@ -596,7 +596,7 @@ async def _read_packet(self, packet_type=MysqlPacket): async def _read_bytes(self, num_bytes): try: data = await self._reader.readexactly(num_bytes) - except asyncio.streams.IncompleteReadError as e: + except asyncio.IncompleteReadError as e: msg = "Lost connection to MySQL server during query" raise OperationalError(2013, msg) from e except (IOError, OSError) as e: