mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
update_layer: improve exception handling
When an exception occurs during the main part of update_layer, we were catching and printing it but that's not enough - we need to do the following as well: * Use logger.error() to print the exception information, so that it gets logged and highlighted as an error in the layer update * Exit with a non-zero return code so that update.py knows it has failed Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
143c8c25a9
commit
74ea84f696
|
@ -808,7 +808,8 @@ def main():
|
|||
pass
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
logger.error(traceback.format_exc().rstrip())
|
||||
sys.exit(1)
|
||||
finally:
|
||||
if tinfoil and (LooseVersion(bb.__version__) > LooseVersion("1.27")):
|
||||
tinfoil.shutdown()
|
||||
|
|
Loading…
Reference in New Issue
Block a user