]> git.ipfire.org Git - thirdparty/hostap.git/commit
tests: test_fst_config: Convert FstLauncher to context manager
authorJohannes Berg <johannes.berg@intel.com>
Tue, 11 May 2021 19:35:47 +0000 (21:35 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 25 Aug 2021 13:20:17 +0000 (16:20 +0300)
commitfde38cac8a223bc858303a8b771c1fb881ed2200
tree075a21d23106dc13e7c07d3602d890bf2acbf1c1
parentc8e2fc1fd5fbaa14ae63d899d1df66e7e3d24f53
tests: test_fst_config: Convert FstLauncher to context manager

Using __del__ for any kind of cleanup is not a good idea
as it's not guaranteed to be called at any particular time,
it's only called whenever the next garbage collect cycle
kicks in.

Use a context manager instead, which basically removes the
need for the try/finally and fixes the reliance on __del__.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/test_fst_config.py