This commit is contained in:
Alex Meade 2011-06-14 13:27:28 -04:00
parent e9f6e47a92
commit cf66a99314
2 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ class JSONDeserializer(TextDeserializer):
return utils.loads(datastring)
except ValueError:
raise exception.MalformedRequestBody(
"malformed JSON in request body")
reason=_("malformed JSON in request body"))
class XMLDeserializer(TextDeserializer):
@ -98,7 +98,7 @@ class XMLDeserializer(TextDeserializer):
return {node.nodeName: self._from_xml_node(node, plurals)}
except ExpatError:
raise exception.MalformedRequestBody(
"malformed XML in request Body")
reason=_("malformed XML in request body"))
def _from_xml_node(self, node, listnames):
"""Convert a minidom node to a simple Python type.

View File

@ -588,4 +588,4 @@ class MigrationError(NovaException):
class MalformedRequestBody(NovaException):
message = _("Malformed message body") + ": %(reason)s"
message = _("Malformed message body: %(reason)s")