drop log= argument from Collection

This commit is contained in:
Damien Elmes 2020-03-05 10:20:16 +10:00
parent 818401e464
commit 6db4418f05
3 changed files with 3 additions and 4 deletions

View File

@ -83,10 +83,9 @@ class _Collection:
db: DBProxy, db: DBProxy,
backend: RustBackend, backend: RustBackend,
server: Optional["anki.storage.ServerData"] = None, server: Optional["anki.storage.ServerData"] = None,
log: bool = False,
) -> None: ) -> None:
self.backend = backend self.backend = backend
self._debugLog = log self._debugLog = not server
self.db = db self.db = db
self.path = db._path self.path = db._path
self._openLog() self._openLog()

View File

@ -459,7 +459,7 @@ close the profile or restart Anki."""
def _loadCollection(self) -> bool: def _loadCollection(self) -> bool:
cpath = self.pm.collectionPath() cpath = self.pm.collectionPath()
self.col = Collection(cpath, log=True) self.col = Collection(cpath)
self.setEnabled(True) self.setEnabled(True)
self.progress.setupDB(self.col.db) self.progress.setupDB(self.col.db)

View File

@ -364,7 +364,7 @@ class SyncThread(QThread):
self.syncMsg = "" self.syncMsg = ""
self.uname = "" self.uname = ""
try: try:
self.col = Collection(self.path, log=True) self.col = Collection(self.path)
except: except:
self.fireEvent("corrupt") self.fireEvent("corrupt")
return return