Add error handling for upgrade firmware
This commit is contained in:
parent
1fe01a11d4
commit
094dadd93e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue