Fix up some changes made by 2to3

This commit is contained in:
flan
2017-11-04 02:15:40 +01:00
parent 0cc21101d7
commit 32b82d5803
7 changed files with 13 additions and 27 deletions

View File

@@ -69,11 +69,8 @@ def monkeypatch_db():
def patched___init__(self, path, text=None, timeout=0):
# Code taken from Anki's DB.__init__()
encpath = path
if isinstance(encpath, str):
encpath = path.encode("utf-8")
# Allow more than one thread to use this connection.
self._db = sqlite.connect(encpath,
self._db = sqlite.connect(path,
timeout=timeout,
check_same_thread=False)
if text: