diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-01-16 09:26:56 +1300 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-01-16 13:07:58 +1300 |
commit | 15748efcc18e0576dd9bee2acd8f35814f568c2d (patch) | |
tree | 419f27e092fc2d7a28421ddd807954b695e63c60 | |
parent | 9ad2b364693814c5107b78ed2fe7e7ab6c7ceb73 (diff) | |
download | openembedded-core-contrib-15748efcc18e0576dd9bee2acd8f35814f568c2d.tar.gz |
update_layer: fix tinfoil shutdown
Fix a couple of problems with shutting down tinfoil:
1) tinfoil.shutdown() wasn't being called on error because it wasn't
inside a finally: section, thus on error the script hung with bitbake
master (since the tinfoil2 changes) - this is almost certainly a bug
in bitbake but let's handle it here anyway.
2) We need to check whether the tinfoil object actually has a shutdown
attribute since we still want to support updating for older branches
where tinfoil didn't have a shutdown() method.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r-- | layerindex/update_layer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layerindex/update_layer.py b/layerindex/update_layer.py index 3936606e25..3497ac5a90 100644 --- a/layerindex/update_layer.py +++ b/layerindex/update_layer.py @@ -678,8 +678,10 @@ def main(): except: import traceback traceback.print_exc() + finally: + if hasattr(tinfoil, 'shutdown'): + tinfoil.shutdown() - tinfoil.shutdown() shutil.rmtree(tempdir) sys.exit(0) |