Prevent accessing error.message in db.py action

This commit is contained in:
rembo10
2022-02-11 10:42:11 +05:30
parent 9c254ff222
commit 9f7be5348b

View File

@@ -117,7 +117,7 @@ class DBConnection:
break
except sqlite3.OperationalError as e:
if "unable to open database file" in e.message or "database is locked" in e.message:
if "unable to open database file" in str(e) or "database is locked" in str(e):
dberror = e
if args is None:
logger.debug('Database error: %s. Query: %s', e, query)