From e616beba1c85e31246d1c798191b194d168b3489 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 5 Aug 2015 15:48:00 +0100 Subject: 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 Signed-off-by: Richard Purdie --- scripts/oe-pkgdata-util | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/oe-pkgdata-util') 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') -- cgit v1.2.3-54-g00ecf