diff --git a/pylib/anki/dbproxy.py b/pylib/anki/dbproxy.py index b104ec1b0..153e1effc 100644 --- a/pylib/anki/dbproxy.py +++ b/pylib/anki/dbproxy.py @@ -11,8 +11,8 @@ from typing import Any, List, Type class DBProxy: - def __init__(self, path: str, timeout: int = 0) -> None: - self._db = sqlite.connect(path, timeout=timeout) + def __init__(self, path: str) -> None: + self._db = sqlite.connect(path, timeout=0) self._path = path self.mod = False @@ -69,9 +69,6 @@ class DBProxy: self._db.text_factory = None self._db.close() - def set_progress_handler(self, *args) -> None: - self._db.set_progress_handler(*args) - def __enter__(self) -> "DBProxy": self._db.execute("begin") return self diff --git a/qt/aqt/progress.py b/qt/aqt/progress.py index 35d86bd25..e16697614 100644 --- a/qt/aqt/progress.py +++ b/qt/aqt/progress.py @@ -35,7 +35,7 @@ class ProgressManager: "Install a handler in the current DB." self.lastDbProgress = 0 self.inDB = False - db.set_progress_handler(self._dbProgress, 10000) + #db.set_progress_handler(self._dbProgress, 10000) def _dbProgress(self): "Called from SQLite."