mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
only remove session if currently active
This commit is contained in:
parent
6bb24d8a16
commit
b43bba1d46
1 changed files with 4 additions and 3 deletions
|
@ -1217,9 +1217,10 @@ Return new path, relative to media dir."""
|
||||||
self.s.commit()
|
self.s.commit()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.s.rollback()
|
if self.s:
|
||||||
self.s.clear()
|
self.s.rollback()
|
||||||
self.s.close()
|
self.s.clear()
|
||||||
|
self.s.close()
|
||||||
self.engine.dispose()
|
self.engine.dispose()
|
||||||
|
|
||||||
def rollback(self):
|
def rollback(self):
|
||||||
|
|
Loading…
Reference in a new issue