mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Only rollback for database locked
raise error for everything else, we should put in place a file that will keep itemids we had to rollback on. To review later.
This commit is contained in:
parent
ee80e2c763
commit
e9fb760fa3
1 changed files with 3 additions and 2 deletions
|
@ -88,8 +88,9 @@ class DatabaseConn(object):
|
||||||
if exc_type is not None:
|
if exc_type is not None:
|
||||||
# Errors were raised in the with statement
|
# Errors were raised in the with statement
|
||||||
log.error("rollback: Type: %s Value: %s", exc_type, exc_val)
|
log.error("rollback: Type: %s Value: %s", exc_type, exc_val)
|
||||||
|
if "database is locked" in exc_val:
|
||||||
self.conn.rollback()
|
self.conn.rollback()
|
||||||
if not "database is locked" in exc_val:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
elif self.commit_mode is not None and changes:
|
elif self.commit_mode is not None and changes:
|
||||||
|
|
Loading…
Reference in a new issue