mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
remove db.close()
This commit is contained in:
parent
fa12213e98
commit
7986a79530
3 changed files with 1 additions and 8 deletions
|
@ -256,7 +256,6 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""",
|
|||
self.save(trx=False)
|
||||
if not self.server:
|
||||
self.db.execute("pragma journal_mode = delete")
|
||||
self.db.close()
|
||||
self.db = None
|
||||
self.backend = None
|
||||
self.media.close()
|
||||
|
|
|
@ -7,8 +7,6 @@ from typing import Any, Iterable, List, Optional, Sequence, Union
|
|||
|
||||
import anki
|
||||
|
||||
# fixme: col.close()/col.reopen() & journal_mode=delete
|
||||
|
||||
# DBValue is actually Union[str, int, float, None], but if defined
|
||||
# that way, every call site needs to do a type check prior to using
|
||||
# the return values.
|
||||
|
@ -27,10 +25,6 @@ class DBProxy:
|
|||
self._path = path
|
||||
self.mod = False
|
||||
|
||||
def close(self) -> None:
|
||||
# fixme
|
||||
pass
|
||||
|
||||
# Transactions
|
||||
###############
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ def getEmptyCol():
|
|||
os.close(fd)
|
||||
os.unlink(nam)
|
||||
col = aopen(nam)
|
||||
col.db.close()
|
||||
col.close()
|
||||
getEmptyCol.master = nam
|
||||
(fd, nam) = tempfile.mkstemp(suffix=".anki2")
|
||||
shutil.copy(getEmptyCol.master, nam)
|
||||
|
|
Loading…
Reference in a new issue