This commit is contained in:
Kovid Goyal 2011-02-28 22:45:28 -07:00
parent a3f24e5a2f
commit 012ef56033

View File

@ -222,11 +222,11 @@ class DBThread(Thread):
except Exception, err:
ok, res = False, (err, traceback.format_exc())
else:
func = getattr(self.conn, func)
bfunc = getattr(self.conn, func)
try:
for i in range(3):
try:
ok, res = True, func(*args, **kwargs)
ok, res = True, bfunc(*args, **kwargs)
break
except OperationalError, err:
# Retry if unable to open db file