Skip to content

Commit 775683e

Browse files
GeneralK1ngtomasr8
andauthored
optimize(code): Update Lib/dbm/sqlite3.py
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
1 parent 7f988dd commit 775683e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/dbm/sqlite3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(self, path, /, *, flag, mode):
7272

7373
self._readonly = (flag == "ro")
7474
# This is an optimization only; it's ok if it fails.
75-
if not self._readonly:
75+
if flag != "ro":
7676
with suppress(sqlite3.OperationalError):
7777
self._cx.execute("PRAGMA journal_mode = OFF")
7878

0 commit comments

Comments
 (0)