args_from_body now ignore empty bodies.

This commit is contained in:
Christophe de Vienne 2012-11-08 15:02:59 +01:00
parent 25b0efaf3a
commit c1ba69fa28
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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)