1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

bitbake: bitbake-layers: use 'with' to manage tinfoil context

(Bitbake rev: bd468a5b9210043d0121a322360d976fd830f736)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Laplante
2024-11-25 16:06:01 -05:00
committed by Richard Purdie
parent f53fe9c84a
commit a8a11cbc79
+3 -5
View File
@@ -57,9 +57,9 @@ def main():
level=logger.getEffectiveLevel()) level=logger.getEffectiveLevel())
plugins = [] plugins = []
tinfoil = bb.tinfoil.Tinfoil(tracking=True) with bb.tinfoil.Tinfoil(tracking=True) as tinfoil:
tinfoil.logger.setLevel(logger.getEffectiveLevel()) tinfoil.logger.setLevel(logger.getEffectiveLevel())
try:
if global_args.force > 1: if global_args.force > 1:
bbpaths = [] bbpaths = []
else: else:
@@ -90,8 +90,6 @@ def main():
tinfoil.config_data.enableTracking() tinfoil.config_data.enableTracking()
return args.func(args) return args.func(args)
finally:
tinfoil.shutdown()
if __name__ == "__main__": if __name__ == "__main__":