Merge "Clean up exception caught in _validate_and_build_base_options"
This commit is contained in:
commit
8017c35291
@ -19,7 +19,6 @@
|
|||||||
"""Handles all requests relating to compute resources (e.g. guest VMs,
|
"""Handles all requests relating to compute resources (e.g. guest VMs,
|
||||||
networking and storage of VMs, and compute hosts on which they run)."""
|
networking and storage of VMs, and compute hosts on which they run)."""
|
||||||
|
|
||||||
import base64
|
|
||||||
import collections
|
import collections
|
||||||
import copy
|
import copy
|
||||||
import functools
|
import functools
|
||||||
@ -772,14 +771,7 @@ class API(base.Base):
|
|||||||
if user_data:
|
if user_data:
|
||||||
try:
|
try:
|
||||||
base64utils.decode_as_bytes(user_data)
|
base64utils.decode_as_bytes(user_data)
|
||||||
except (base64.binascii.Error, TypeError):
|
except TypeError:
|
||||||
# TODO(harlowja): reduce the above exceptions caught to
|
|
||||||
# only type error once we get a new oslo.serialization
|
|
||||||
# release that captures and makes only one be output.
|
|
||||||
#
|
|
||||||
# We can eliminate the capture of `binascii.Error` when:
|
|
||||||
#
|
|
||||||
# https://review.openstack.org/#/c/418066/ is released.
|
|
||||||
raise exception.InstanceUserDataMalformed()
|
raise exception.InstanceUserDataMalformed()
|
||||||
|
|
||||||
# When using Neutron, _check_requested_secgroups will translate and
|
# When using Neutron, _check_requested_secgroups will translate and
|
||||||
|
Loading…
Reference in New Issue
Block a user