mp fixes
This commit is contained in:
parent
e9f6e47a92
commit
cf66a99314
@ -77,7 +77,7 @@ class JSONDeserializer(TextDeserializer):
|
|||||||
return utils.loads(datastring)
|
return utils.loads(datastring)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise exception.MalformedRequestBody(
|
raise exception.MalformedRequestBody(
|
||||||
"malformed JSON in request body")
|
reason=_("malformed JSON in request body"))
|
||||||
|
|
||||||
|
|
||||||
class XMLDeserializer(TextDeserializer):
|
class XMLDeserializer(TextDeserializer):
|
||||||
@ -98,7 +98,7 @@ class XMLDeserializer(TextDeserializer):
|
|||||||
return {node.nodeName: self._from_xml_node(node, plurals)}
|
return {node.nodeName: self._from_xml_node(node, plurals)}
|
||||||
except ExpatError:
|
except ExpatError:
|
||||||
raise exception.MalformedRequestBody(
|
raise exception.MalformedRequestBody(
|
||||||
"malformed XML in request Body")
|
reason=_("malformed XML in request body"))
|
||||||
|
|
||||||
def _from_xml_node(self, node, listnames):
|
def _from_xml_node(self, node, listnames):
|
||||||
"""Convert a minidom node to a simple Python type.
|
"""Convert a minidom node to a simple Python type.
|
||||||
|
@ -588,4 +588,4 @@ class MigrationError(NovaException):
|
|||||||
|
|
||||||
|
|
||||||
class MalformedRequestBody(NovaException):
|
class MalformedRequestBody(NovaException):
|
||||||
message = _("Malformed message body") + ": %(reason)s"
|
message = _("Malformed message body: %(reason)s")
|
||||||
|
Loading…
Reference in New Issue
Block a user