Skip to content

Commit ae4757d

Browse files
committed
fix type check
1 parent 30f0814 commit ae4757d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MySQLdb/connections.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class object, used to create cursors (keyword only)
184184

185185
super().__init__(*args, **kwargs2)
186186
self.cursorclass = cursorclass
187-
self.encoders = {k: v for k, v in conv.items() if type(k) is not int}
187+
self.encoders = {k: v for k, v in conv.items() if not isinstance(k, int)}
188188

189189
# XXX THIS IS GARBAGE: While this is just a garbage and undocumented,
190190
# Django 1.11 depends on it. And they don't fix it because

0 commit comments

Comments
 (0)