From 6db4418f0562250911cd84e9c13f8ad4fea07f2e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 5 Mar 2020 10:20:16 +1000 Subject: [PATCH] drop log= argument from Collection --- pylib/anki/collection.py | 3 +-- qt/aqt/main.py | 2 +- qt/aqt/sync.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pylib/anki/collection.py b/pylib/anki/collection.py index 409ab5fde..615c86df9 100644 --- a/pylib/anki/collection.py +++ b/pylib/anki/collection.py @@ -83,10 +83,9 @@ class _Collection: db: DBProxy, backend: RustBackend, server: Optional["anki.storage.ServerData"] = None, - log: bool = False, ) -> None: self.backend = backend - self._debugLog = log + self._debugLog = not server self.db = db self.path = db._path self._openLog() diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 1a2a1473a..7129f9c7d 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -459,7 +459,7 @@ close the profile or restart Anki.""" def _loadCollection(self) -> bool: cpath = self.pm.collectionPath() - self.col = Collection(cpath, log=True) + self.col = Collection(cpath) self.setEnabled(True) self.progress.setupDB(self.col.db) diff --git a/qt/aqt/sync.py b/qt/aqt/sync.py index fdbb7ef1f..658874498 100644 --- a/qt/aqt/sync.py +++ b/qt/aqt/sync.py @@ -364,7 +364,7 @@ class SyncThread(QThread): self.syncMsg = "" self.uname = "" try: - self.col = Collection(self.path, log=True) + self.col = Collection(self.path) except: self.fireEvent("corrupt") return