We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bec4b6d commit df44a58Copy full SHA for df44a58
src/calibre/devices/kobo/db.py
@@ -14,6 +14,7 @@
14
# Any plugins not running in the device thread must acquire this lock before
15
# trying to access the Kobo database.
16
kobo_db_lock = RLock()
17
+INJECT_9P_ERROR = False
18
19
20
def row_factory(cursor: apsw.Cursor, row):
@@ -43,6 +44,8 @@ def __init__(self, path_on_device: str):
43
44
self.path_on_device = self.dbpath = path_on_device
45
self.dbversion = 0
46
def connect(path: str = path_on_device) -> None:
47
+ if INJECT_9P_ERROR:
48
+ raise apsw.IOError('Fake I/O error to test 9p codepath')
49
with closing(apsw.Connection(path)) as conn:
50
conn.setrowtrace(row_factory)
51
cursor = conn.cursor()
0 commit comments