Skip to content

Commit fd702c6

Browse files
committed
fix int2byte() import.
1 parent 33d93d9 commit fd702c6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

pymysqlreplication/binlogstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from pymysql.constants.COMMAND import COM_BINLOG_DUMP, COM_REGISTER_SLAVE
88
from pymysql.cursors import DictCursor
9-
from pymysql.util import int2byte
9+
from six import int2byte
1010

1111
from .packet import BinLogPacketWrapper
1212
from .constants.BINLOG import TABLE_MAP_EVENT, ROTATE_EVENT

pymysqlreplication/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import struct
55
import datetime
66

7-
from pymysql.util import byte2int, int2byte
7+
from six import byte2int, int2byte
88

99

1010
class BinLogEvent(object):

pymysqlreplication/packet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import struct
44

5-
from pymysql.util import byte2int
5+
from six import byte2int
66

77
from pymysqlreplication import constants, event, row_event
88

pymysqlreplication/row_event.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import struct
44
import decimal
55
import datetime
6-
import json
6+
# import json
77

8-
from pymysql.util import byte2int
8+
from six import byte2int
99
from pymysql.charset import charset_by_name
1010

1111
from .event import BinLogEvent
@@ -617,7 +617,7 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs)
617617
'COLUMN_TYPE': 'BLOB', # we don't know what it is, so let's not do anything with it.
618618
'COLUMN_KEY': '',
619619
}
620-
col = Column(byte2int(column_type), column_schema, from_packet)
620+
col = Column(column_type, column_schema, from_packet)
621621
self.columns.append(col)
622622

623623
self.table_obj = Table(self.column_schemas, self.table_id, self.schema,

0 commit comments

Comments
 (0)