Catch TypeError when new_size is None on extend
The volume_actions extend method does not catch/handle TypeError exceptions. The tempest volume_actions test includes a negative test that doesn't pass in a new-size so the result is we get an unhandled exception/trace in the log files for these runs. Change-Id: I8b699a28e06e62126da02c3318d3129412dffa6b Closes-Bug: #1259336
This commit is contained in:
parent
7689ff9a01
commit
bc16517ac7
|
@ -257,7 +257,7 @@ class VolumeActionsController(wsgi.Controller):
|
|||
|
||||
try:
|
||||
_val = int(body['os-extend']['new_size'])
|
||||
except (KeyError, ValueError):
|
||||
except (KeyError, ValueError, TypeError):
|
||||
msg = _("New volume size must be specified as an integer.")
|
||||
raise webob.exc.HTTPBadRequest(explanation=msg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue