mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12: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)
|
self.save(trx=False)
|
||||||
if not self.server:
|
if not self.server:
|
||||||
self.db.execute("pragma journal_mode = delete")
|
self.db.execute("pragma journal_mode = delete")
|
||||||
self.db.close()
|
|
||||||
self.db = None
|
self.db = None
|
||||||
self.backend = None
|
self.backend = None
|
||||||
self.media.close()
|
self.media.close()
|
||||||
|
|
|
@ -7,8 +7,6 @@ from typing import Any, Iterable, List, Optional, Sequence, Union
|
||||||
|
|
||||||
import anki
|
import anki
|
||||||
|
|
||||||
# fixme: col.close()/col.reopen() & journal_mode=delete
|
|
||||||
|
|
||||||
# DBValue is actually Union[str, int, float, None], but if defined
|
# 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
|
# that way, every call site needs to do a type check prior to using
|
||||||
# the return values.
|
# the return values.
|
||||||
|
@ -27,10 +25,6 @@ class DBProxy:
|
||||||
self._path = path
|
self._path = path
|
||||||
self.mod = False
|
self.mod = False
|
||||||
|
|
||||||
def close(self) -> None:
|
|
||||||
# fixme
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Transactions
|
# Transactions
|
||||||
###############
|
###############
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ def getEmptyCol():
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
os.unlink(nam)
|
os.unlink(nam)
|
||||||
col = aopen(nam)
|
col = aopen(nam)
|
||||||
col.db.close()
|
col.close()
|
||||||
getEmptyCol.master = nam
|
getEmptyCol.master = nam
|
||||||
(fd, nam) = tempfile.mkstemp(suffix=".anki2")
|
(fd, nam) = tempfile.mkstemp(suffix=".anki2")
|
||||||
shutil.copy(getEmptyCol.master, nam)
|
shutil.copy(getEmptyCol.master, nam)
|
||||||
|
|
Loading…
Reference in a new issue