bitbake: bitbake-diffsigs/bitbake-layers: Ensure tinfoil is shut down correctly
We should always shut down tinfoil when we're finished with it, either by explicitly calling the shutdown() method or by using it as a context manager ("with ..."). (Bitbake rev: 131e6dc4bbd197774d35d2b266bfb0816f6e6b1e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
8f277fcf33
commit
f551e67fa7
|
@ -115,8 +115,8 @@ parser.add_option("-t", "--task",
|
|||
options, args = parser.parse_args(sys.argv)
|
||||
|
||||
if options.taskargs:
|
||||
tinfoil = bb.tinfoil.Tinfoil()
|
||||
tinfoil.prepare(config_only = True)
|
||||
with bb.tinfoil.Tinfoil() as tinfoil:
|
||||
tinfoil.prepare(config_only=True)
|
||||
find_compare_task(tinfoil, options.taskargs[0], options.taskargs[1])
|
||||
else:
|
||||
if len(args) == 1:
|
||||
|
|
|
@ -87,6 +87,7 @@ def main():
|
|||
|
||||
plugins = []
|
||||
tinfoil = tinfoil_init(False)
|
||||
try:
|
||||
for path in ([topdir] +
|
||||
tinfoil.config_data.getVar('BBPATH', True).split(':')):
|
||||
pluginpath = os.path.join(path, 'lib', 'bblayers')
|
||||
|
@ -112,6 +113,8 @@ def main():
|
|||
tinfoil.config_data.enableTracking()
|
||||
|
||||
return args.func(args)
|
||||
finally:
|
||||
tinfoil.shutdown()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue