From: Christian Heller Date: Mon, 2 Dec 2024 11:12:04 +0000 (+0100) Subject: Ensure DbConn encapsulates its executions into rollbackable transactions. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%22https:/validator.w3.org/test.html?a=commitdiff_plain;h=2d7664085a53517389bf9c3234530d434471d0c3;p=ytplom Ensure DbConn encapsulates its executions into rollbackable transactions. --- diff --git a/src/ytplom/misc.py b/src/ytplom/misc.py index 805f22f..4c26b4b 100644 --- a/src/ytplom/misc.py +++ b/src/ytplom/misc.py @@ -152,7 +152,7 @@ class DbConn: raise HandledException( f'wrong database version {cur_version}, expected: ' f'{EXPECTED_DB_VERSION} – run "migrate"?') - self._conn = sql_connect(self._path) + self._conn = sql_connect(self._path, autocommit=False) def __enter__(self) -> Self: return self