From fafae11adfe545b6aefb010fb69917c457e053aa Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 1 Sep 2018 12:40:02 +0200 Subject: Mark SQLITE_IOERR/SQLITE_CANTOPEN as environmental error Fixes #3060 IOERR: The SQLITE_IOERR result code says that the operation could not finish because the operating system reported an I/O error. CANTOPEN: The SQLITE_CANTOPEN result code indicates that SQLite was unable to open a file. The file in question might be a primary database file or on of several temporary disk files. --- qutebrowser/misc/sql.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qutebrowser/misc/sql.py b/qutebrowser/misc/sql.py index 9b09fb132..863961ed3 100644 --- a/qutebrowser/misc/sql.py +++ b/qutebrowser/misc/sql.py @@ -70,8 +70,10 @@ class SqliteError(SqlError): environmental_errors = [ '5', # SQLITE_BUSY ("database is locked") '8', # SQLITE_READONLY + '10', # SQLITE_IOERR '11', # SQLITE_CORRUPT '13', # SQLITE_FULL + '14', # SQLITE_CANTOPEN ] # At least in init(), we can get errors like this: # type: ConnectionError -- cgit v1.2.3-54-g00ecf