[Fix] Unhandled exception in maasdriver

- Fix an issue where the exception handler is itself
  throwing an exception

Change-Id: I4a197dcd62b68a5107d43d7532fec5c3c4d69229
This commit is contained in:
Scott Hussey 2018-03-23 09:06:52 -05:00
parent a71c4be911
commit a1e5715953
1 changed files with 2 additions and 2 deletions

View File

@ -204,8 +204,8 @@ class MaasNodeDriver(NodeDriver):
maas_client=maas_client)
action.start()
except Exception as e:
msg = "Subtask for action %s raised unexpected exceptions" % task.action
self.logger.error(msg, exc_info=e.exception())
msg = ("Subtask for action %s raised unexpected exception: %s" % (task.action, str(e)))
self.logger.error(msg, exc_info=e)
task.add_status_msg(
msg, error=True, ctx=str(task.get_id()), ctx_type='task')
task.failure()