summaryrefslogtreecommitdiffstats
path: root/scripts/oe-pkgdata-util
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-05 15:48:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-03 23:45:54 +0100
commite616beba1c85e31246d1c798191b194d168b3489 (patch)
tree5b9d19e7c4a7caeb72f1bb9da4a2b221cfb1da96 /scripts/oe-pkgdata-util
parentf2854c67ce963211f27223bd1194420621694bc2 (diff)
downloadpoky-e616beba1c85e31246d1c798191b194d168b3489.tar.gz
scripts: 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 ..."). (From OE-Core rev: 5ec6d9ef309b841cdcbf1d14ac678d106d5d888a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-pkgdata-util')
-rwxr-xr-xscripts/oe-pkgdata-util5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index e4d262d7b7..bb917b4fc4 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -569,7 +569,10 @@ def main():
569 sys.exit(1) 569 sys.exit(1)
570 logger.debug('Found bitbake path: %s' % bitbakepath) 570 logger.debug('Found bitbake path: %s' % bitbakepath)
571 tinfoil = tinfoil_init() 571 tinfoil = tinfoil_init()
572 args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True) 572 try:
573 args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
574 finally:
575 tinfoil.shutdown()
573 logger.debug('Value of PKGDATA_DIR is "%s"' % args.pkgdata_dir) 576 logger.debug('Value of PKGDATA_DIR is "%s"' % args.pkgdata_dir)
574 if not args.pkgdata_dir: 577 if not args.pkgdata_dir:
575 logger.error('Unable to determine pkgdata directory from PKGDATA_DIR') 578 logger.error('Unable to determine pkgdata directory from PKGDATA_DIR')