mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 13:14:46 +02:00
update: ensure that exceptions during the update process are logged
If an exception occurred during the update then we were managing to save the update record, but we did not include the exception traceback in the log for the update. Catch the exception and log it which ensures it gets captured in the update record and still gets printed as well. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
db08df4a86
commit
dafa4dc129
|
@ -540,6 +540,10 @@ def main():
|
|||
except KeyboardInterrupt:
|
||||
logger.info('Update interrupted, exiting')
|
||||
sys.exit(254)
|
||||
except Exception:
|
||||
import traceback
|
||||
logger.error(traceback.format_exc().rstrip())
|
||||
sys.exit(1)
|
||||
finally:
|
||||
update.log = ''.join(listhandler.read())
|
||||
update.finished = datetime.now()
|
||||
|
|
Loading…
Reference in New Issue
Block a user