diff options
author | Chris Laplante <chris.laplante@agilent.com> | 2024-11-25 12:22:03 -0500 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-11-30 05:41:59 -0800 |
commit | d28c963ec40587cea2d82dde43f0612f0faef12f (patch) | |
tree | f39b4987eaa4c5aa22465249db99fcbb3fe73ab1 /bitbake | |
parent | aeea31fea5d3ce3995b378cdd8f7ccce5e41ad52 (diff) | |
download | poky-d28c963ec40587cea2d82dde43f0612f0faef12f.tar.gz |
bitbake: persist_data: close connection in SQLTable __exit__
A Connection's __exit__ does not close the connection, but rather deals
with transactions. See https://docs.python.org/3/library/sqlite3.html#how-to-use-the-connection-context-manager
This change is not necessary on 'master' because persist_data was
removed.
(Bitbake rev: a5640a2527cf1995e2afb80c95f303dea52c73b3)
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
(cherry picked from commit b0fba0f5af555ff970406b5cf3bf8fb113d953d1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index bcca791edf..c4454b153a 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py | |||
@@ -154,6 +154,7 @@ class SQLTable(collections.abc.MutableMapping): | |||
154 | 154 | ||
155 | def __exit__(self, *excinfo): | 155 | def __exit__(self, *excinfo): |
156 | self.connection.__exit__(*excinfo) | 156 | self.connection.__exit__(*excinfo) |
157 | self.connection.close() | ||
157 | 158 | ||
158 | @_Decorators.retry() | 159 | @_Decorators.retry() |
159 | @_Decorators.transaction | 160 | @_Decorators.transaction |