mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 09:46: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)
|
||||||
self.conn.rollback()
|
if "database is locked" in exc_val:
|
||||||
if not "database is locked" in exc_val:
|
self.conn.rollback()
|
||||||
|
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