mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
...
This commit is contained in:
parent
a3f24e5a2f
commit
012ef56033
@ -222,11 +222,11 @@ class DBThread(Thread):
|
|||||||
except Exception, err:
|
except Exception, err:
|
||||||
ok, res = False, (err, traceback.format_exc())
|
ok, res = False, (err, traceback.format_exc())
|
||||||
else:
|
else:
|
||||||
func = getattr(self.conn, func)
|
bfunc = getattr(self.conn, func)
|
||||||
try:
|
try:
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
try:
|
try:
|
||||||
ok, res = True, func(*args, **kwargs)
|
ok, res = True, bfunc(*args, **kwargs)
|
||||||
break
|
break
|
||||||
except OperationalError, err:
|
except OperationalError, err:
|
||||||
# Retry if unable to open db file
|
# Retry if unable to open db file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user