Skip to content

Commit 0955ff1

Browse files
Polishing.
1 parent 3d7596b commit 0955ff1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/dbm/sqlite3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def __init__(self, path, /, *, flag, mode):
6969
except sqlite3.Error as exc:
7070
raise error(str(exc))
7171

72-
# This is an optimization only; it's ok if it fails.
7372
if flag != "ro":
73+
# This is an optimization only; it's ok if it fails.
7474
with suppress(sqlite3.OperationalError):
7575
self._cx.execute("PRAGMA journal_mode = wal")
7676

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Fix :exc:`sqlite3.OperationalError` error when using :func:`dbm.open` with a read-only file object.
1+
Fix opening a :mod:`dbm.sqlite3` database for reading from read-only file
2+
or directory.

0 commit comments

Comments
 (0)