Fixed bug where multiple instances of dejavu where not working

This commit is contained in:
J. Pery 2019-02-06 10:53:07 +01:00
parent 7f53f2ab68
commit b72921e2f7

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: