[IMP] Warn if invalid response type is returned for a request@type=http

bzr revid: fme@openerp.com-20140219153201-hgyk9c83hwqe49yl
This commit is contained in:
Fabien Meghazi 2014-02-19 16:32:01 +01:00
parent ae87d00ffa
commit d5dbf9184d
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ def route(route=None, **kw):
elif isinstance(response, basestring):
return Response(response)
else:
raise "TODO: shall we autorise this ?"
_logger.warn("<function %s.%s> returns an invalid response type for an http request" % (f.__module__, f.__name__))
return response
response_wrap.routing = routing
response_wrap.original_func = f