From da66c62f814a6dc466fea3bb3cbfcabfd6fb2e03 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 19 Dec 2020 21:43:59 +0100 Subject: [PATCH] Fix check of exception value --- resources/lib/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/db.py b/resources/lib/db.py index 28ffc7c7..e9faa8c9 100644 --- a/resources/lib/db.py +++ b/resources/lib/db.py @@ -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