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:46 +0100
commit5ec6d9ef309b841cdcbf1d14ac678d106d5d888a (patch)
tree0276975aedc0820dff4e28fcf7ddfea67fb6f5e3 /scripts/oe-pkgdata-util
parent55115f90f909d27599c686852e73df321ad1edff (diff)
downloadopenembedded-core-contrib-5ec6d9ef309b841cdcbf1d14ac678d106d5d888a.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 ..."). 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():
sys.exit(1)
logger.debug('Found bitbake path: %s' % bitbakepath)
tinfoil = tinfoil_init()
- args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+ try:
+ args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+ finally:
+ tinfoil.shutdown()
logger.debug('Value of PKGDATA_DIR is "%s"' % args.pkgdata_dir)
if not args.pkgdata_dir:
logger.error('Unable to determine pkgdata directory from PKGDATA_DIR')