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,6 +1217,7 @@ Return new path, relative to media dir."""
|
|||
self.s.commit()
|
||||
|
||||
def close(self):
|
||||
if self.s:
|
||||
self.s.rollback()
|
||||
self.s.clear()
|
||||
self.s.close()
|
||||
|
|
Loading…
Reference in a new issue