From a8a11cbc79f73d48916ffa7594c60e400dcc3bcc Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Mon, 25 Nov 2024 16:06:01 -0500 Subject: bitbake: bitbake-layers: use 'with' to manage tinfoil context (Bitbake rev: bd468a5b9210043d0121a322360d976fd830f736) Signed-off-by: Chris Laplante Signed-off-by: Richard Purdie --- bitbake/bin/bitbake-layers | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index 613e675cb0..7bd3ea20e4 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers @@ -57,9 +57,9 @@ def main(): level=logger.getEffectiveLevel()) plugins = [] - tinfoil = bb.tinfoil.Tinfoil(tracking=True) - tinfoil.logger.setLevel(logger.getEffectiveLevel()) - try: + with bb.tinfoil.Tinfoil(tracking=True) as tinfoil: + tinfoil.logger.setLevel(logger.getEffectiveLevel()) + if global_args.force > 1: bbpaths = [] else: @@ -90,8 +90,6 @@ def main(): tinfoil.config_data.enableTracking() return args.func(args) - finally: - tinfoil.shutdown() if __name__ == "__main__": -- cgit v1.2.3-54-g00ecf