Merge pull request #185 from JPery/MultipleInstancesFix

Fixed bug where multiple instances of dejavu where not working
This commit is contained in:
Will Drevo 2019-05-27 00:22:24 -07:00 committed by GitHub
commit d2b8761eb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -333,11 +333,11 @@ class Cursor(object):
cur.execute(query) cur.execute(query)
``` ```
""" """
_cache = Queue.Queue(maxsize=5)
def __init__(self, cursor_type=mysql.cursors.Cursor, **options): def __init__(self, cursor_type=mysql.cursors.Cursor, **options):
super(Cursor, self).__init__() super(Cursor, self).__init__()
self._cache = Queue.Queue(maxsize=5)
try: try:
conn = self._cache.get_nowait() conn = self._cache.get_nowait()
except Queue.Empty: except Queue.Empty: