File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import math
66from typing import Any
77
8+ import dqliteclient .exceptions as _client_exc
89from dqliteclient import DqliteConnection
910from dqlitedbapi .aio .cursor import AsyncCursor
1011from dqlitedbapi .exceptions import InterfaceError , OperationalError
@@ -121,8 +122,6 @@ async def commit(self) -> None:
121122 raise InterfaceError ("Connection is closed" )
122123 if self ._async_conn is None :
123124 return
124- import dqliteclient .exceptions as _client_exc
125-
126125 _ , op_lock = self ._ensure_locks ()
127126 async with op_lock :
128127 try :
@@ -137,8 +136,6 @@ async def rollback(self) -> None:
137136 raise InterfaceError ("Connection is closed" )
138137 if self ._async_conn is None :
139138 return
140- import dqliteclient .exceptions as _client_exc
141-
142139 _ , op_lock = self ._ensure_locks ()
143140 async with op_lock :
144141 try :
Original file line number Diff line number Diff line change 88import weakref
99from typing import Any
1010
11+ import dqliteclient .exceptions as _client_exc
1112from dqliteclient import DqliteConnection
1213from dqlitedbapi .cursor import Cursor
1314from dqlitedbapi .exceptions import InterfaceError , OperationalError , ProgrammingError
@@ -259,8 +260,6 @@ def commit(self) -> None:
259260 async def _commit_async (self ) -> None :
260261 """Async implementation of commit."""
261262 assert self ._async_conn is not None
262- import dqliteclient .exceptions as _client_exc
263-
264263 try :
265264 await self ._async_conn .execute ("COMMIT" )
266265 except (OperationalError , _client_exc .OperationalError ) as e :
@@ -283,8 +282,6 @@ def rollback(self) -> None:
283282 async def _rollback_async (self ) -> None :
284283 """Async implementation of rollback."""
285284 assert self ._async_conn is not None
286- import dqliteclient .exceptions as _client_exc
287-
288285 try :
289286 await self ._async_conn .execute ("ROLLBACK" )
290287 except (OperationalError , _client_exc .OperationalError ) as e :
You can’t perform that action at this time.
0 commit comments