Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pymysql/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def _read_packet(self, packet_type=MysqlPacket):
:raise OperationalError: If the connection to the MySQL server is lost.
:raise InternalError: If the packet sequence number is wrong.
"""
buff = b''
buff = bytearray()
while True:
packet_header = self._read_bytes(4)
#if DEBUG: dump_packet(packet_header)
Expand Down Expand Up @@ -666,7 +666,7 @@ def _read_packet(self, packet_type=MysqlPacket):
if bytes_to_read < MAX_PACKET_LEN:
break

packet = packet_type(buff, self.encoding)
packet = packet_type(bytes(buff), self.encoding)
packet.check_error()
return packet

Expand Down