Add error handling for upgrade firmware

This commit is contained in:
Jay Faulkner 2016-06-10 14:38:55 -07:00
parent 1fe01a11d4
commit 094dadd93e
1 changed files with 6 additions and 1 deletions

View File

@ -142,5 +142,10 @@ class ExampleDeviceHardwareManager(hardware.HardwareManager):
else:
LOG.debug('Firmware version X found, upgrading to Y')
# Perform firmware upgrade.
_upgrade_firmware()
try:
_upgrade_firmware()
except Exception as e:
# Log and pass through the exception so cleaning will fail
LOG.exception(e)
raise
return True