diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-09-09 11:58:42 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-28 14:03:18 +0200 |
commit | 5e89f6d59cf63fcd0c421ea546d4d2fc21bdf574 (patch) | |
tree | 04ee13d13719c39189925674f47a05c5ab930ba7 /src/hydrilla/proxy/state_impl/base.py | |
parent | beb163cfd15b93bf664b6a0590e114d4432e3ef9 (diff) | |
download | haketilo-hydrilla-5e89f6d59cf63fcd0c421ea546d4d2fc21bdf574.tar.gz haketilo-hydrilla-5e89f6d59cf63fcd0c421ea546d4d2fc21bdf574.zip |
[proxy] guard more code with lock in Haketilo state implementation
Diffstat (limited to 'src/hydrilla/proxy/state_impl/base.py')
-rw-r--r-- | src/hydrilla/proxy/state_impl/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hydrilla/proxy/state_impl/base.py b/src/hydrilla/proxy/state_impl/base.py index 75d733f..f969b19 100644 --- a/src/hydrilla/proxy/state_impl/base.py +++ b/src/hydrilla/proxy/state_impl/base.py @@ -153,10 +153,10 @@ class HaketiloStateWithFields(st.HaketiloState): @contextmanager def cursor(self, transaction: bool = False) \ -> t.Iterator[sqlite3.Cursor]: - """....""" - start_transaction = transaction and not self.connection.in_transaction - with self.lock: + start_transaction = \ + transaction and not self.connection.in_transaction + if self.current_cursor is not None: yield self.current_cursor return |