Fix check of exception value

This commit is contained in:
croneter 2020-12-19 21:43:59 +01:00
parent cc20464c15
commit da66c62f81

View file

@ -32,7 +32,7 @@ def catch_operationalerrors(method):
try:
return method(self, *args, **kwargs)
except sqlite3.OperationalError as err:
if 'database is locked' not in err:
if err.args[0] and 'database is locked' not in err.args[0]:
# Not an error we want to catch, so reraise it
raise
attempts -= 1