diff options
author | Chris Laplante <chris.laplante@agilent.com> | 2024-11-25 12:12:03 -0500 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-12-06 05:50:24 -0800 |
commit | 52d9241ee5e02879aa3f751b4e3c92e8a8a4e78c (patch) | |
tree | 11d72cd00cae48901d49744ca58653133151d22e | |
parent | dbb243bf0bc8ef394640dcfcbbef3397b2617c8f (diff) | |
download | poky-52d9241ee5e02879aa3f751b4e3c92e8a8a4e78c.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: c9ea354c2df3d94b9ebe7810e83df9efb6007013)
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-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 |