From 52d9241ee5e02879aa3f751b4e3c92e8a8a4e78c Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Mon, 25 Nov 2024 12:12:03 -0500 Subject: [PATCH] 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 Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- bitbake/lib/bb/persist_data.py | 1 + 1 file changed, 1 insertion(+) 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): def __exit__(self, *excinfo): self.connection.__exit__(*excinfo) + self.connection.close() @_Decorators.retry() @_Decorators.transaction