]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
persist_data: make SQLTable a context manager
authorChris Larson <chris_larson@mentor.com>
Thu, 10 Feb 2011 00:57:03 +0000 (17:57 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 6 Apr 2011 00:21:48 +0000 (17:21 -0700)
commitd6fba8bad6277eb2a19e94f93a7a4baf74b29ef3
treee41909a1981abb02246d821f416356f1b1781cc9
parent28958cd55e592853c68f5f2ba79381d1b8dcfb8f
persist_data: make SQLTable a context manager

This can be used for more control over the underlying transactions.  Unlike
the context manager of, say, a file object, we can still use the object even
after the end of a given with block, as the context manager exit only ensures
we've committed to the database, not that we have closed the database.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/persist_data.py