args_from_body now ignore empty bodies.
This commit is contained in:
parent
25b0efaf3a
commit
c1ba69fa28
2
tox.ini
2
tox.ini
@ -87,5 +87,5 @@ deps=
|
||||
commands=
|
||||
{envbindir}/coverage erase
|
||||
{envbindir}/coverage combine
|
||||
{envbindir}/coverage xml wsme/*.py wsme/protocols/*.py
|
||||
{envbindir}/coverage xml wsme/*.py wsme/rest/*.py
|
||||
{envbindir}/coverage report --show-missing wsme/*.py wsme/protocols/*.py
|
||||
|
@ -153,6 +153,8 @@ def args_from_body(funcdef, body, mimetype):
|
||||
dataformat = restjson
|
||||
elif mimetype in restxml.accept_content_types:
|
||||
dataformat = restxml
|
||||
elif not body:
|
||||
return (), {}
|
||||
else:
|
||||
raise ValueError("Unknow mimetype: %s" % mimetype)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user