Correcting the mistakes that Travis CI showed me
@@ -36,7 +36,8 @@ import six
class DBAccessError(Exception):
"""The SQLite database became inaccessible.
This can happen when trying to read or write the
- database when, for example, the database file is deleted or otherwise disappears.
+ database when, for example, the database file
+ is deleted or otherwise disappears.
There is probably no way to recover from this error.
"""
@@ -692,10 +693,10 @@ class Transaction(object):
cursor = self.db._connection().execute(statement, subvals)
return cursor.lastrowid
except sqlite3.OperationalError as e:
- if e.args[0] in ('unable to open database file',
- 'attempt to write a readonly database file'):
- raise DBAccessError("Unable to open database file." \
- "It might be a permissions problem.")
+ if e.args[0] in ("attempt to write a readonly database",
+ "unable to open database file"):
+ raise DBAccessError('Unable to open database file.'
+ 'It might be a permissions problem')
def script(self, statements):
"""Execute a string containing multiple SQL statements."""
