diff options
| author | Chris Laplante <chris.laplante@agilent.com> | 2024-11-25 12:19:08 -0500 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-12-02 06:23:19 -0800 |
| commit | 8a495b86c82bd1121a2f8c685068da590a0116a6 (patch) | |
| tree | 05b5969c97f3c060307d3d53bb03ca6e0a3dc778 | |
| parent | c0dcc563322cbe8b4c323172d66d04d16d2067e8 (diff) | |
| download | poky-8a495b86c82bd1121a2f8c685068da590a0116a6.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: 97856a56cbf09401b34d6c9bb5444c07a88772ce)
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>
| -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 ce84a15825..784755452d 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 |
