Fix: reference an undefined attribute of 'msg' of Exception

Change-Id: Ie1b0d61ba9e9118ca92240fa844c025b98a42d82
Closes-Bug: #1676804
This commit is contained in:
zengchen 2017-03-28 18:00:02 +08:00
parent 9bc1a31293
commit a9edb7cfb6
1 changed files with 2 additions and 1 deletions

View File

@ -421,8 +421,9 @@ class ProvidersController(wsgi.Controller):
checkpoint_id = self.protection_api.protect(context, plan,
checkpoint_properties)
except Exception as error:
msg = _("Create checkpoint failed: %s") % error.msg
msg = _("Create checkpoint failed: %s") % error
raise exc.HTTPBadRequest(explanation=msg)
checkpoint_properties['id'] = checkpoint_id
LOG.info("Create the checkpoint successfully. checkpoint_id:%s",