diff options
author | Chris Laplante <chris.laplante@agilent.com> | 2024-11-25 16:06:01 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-28 00:06:24 +0000 |
commit | a8a11cbc79f73d48916ffa7594c60e400dcc3bcc (patch) | |
tree | 300b7ce419492eb9aaf57ecfeac902c14871db80 /bitbake/bin/bitbake-layers | |
parent | f53fe9c84aca500f12915a2e1c5d3f189fc8af0c (diff) | |
download | poky-a8a11cbc79f73d48916ffa7594c60e400dcc3bcc.tar.gz |
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>
Diffstat (limited to 'bitbake/bin/bitbake-layers')
-rwxr-xr-x | bitbake/bin/bitbake-layers | 8 |
1 files 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(): | |||
57 | level=logger.getEffectiveLevel()) | 57 | level=logger.getEffectiveLevel()) |
58 | 58 | ||
59 | plugins = [] | 59 | plugins = [] |
60 | tinfoil = bb.tinfoil.Tinfoil(tracking=True) | 60 | with bb.tinfoil.Tinfoil(tracking=True) as tinfoil: |
61 | tinfoil.logger.setLevel(logger.getEffectiveLevel()) | 61 | tinfoil.logger.setLevel(logger.getEffectiveLevel()) |
62 | try: | 62 | |
63 | if global_args.force > 1: | 63 | if global_args.force > 1: |
64 | bbpaths = [] | 64 | bbpaths = [] |
65 | else: | 65 | else: |
@@ -90,8 +90,6 @@ def main(): | |||
90 | tinfoil.config_data.enableTracking() | 90 | tinfoil.config_data.enableTracking() |
91 | 91 | ||
92 | return args.func(args) | 92 | return args.func(args) |
93 | finally: | ||
94 | tinfoil.shutdown() | ||
95 | 93 | ||
96 | 94 | ||
97 | if __name__ == "__main__": | 95 | if __name__ == "__main__": |