mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
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>
This commit is contained in:
parent
9ad2b36469
commit
15748efcc1
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user