Ladon can't understand primitive bool
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ladon |
Fix Committed
|
High
|
jsgaarde |
Bug Description
Ladon 0.7.0 is unable to understand bool primitive as parameter of a function:
*******
from ladon.ladonizer import ladonize
class Services(object):
@ladonize(bool, rtype=unicode)
def do_something(self, foo):
if foo:
return u'Yes!'
return u'No!'
*******
from ladon.clients.
service = JSONWSPClient('http://
print service.
print service.
*******
{u'fault': {u'detail': [u'Traceback (most recent call last):', u' File "/usr/local/
The relevant part is at line 36 in /usr/local/
# Check the value type
if not type(val) == PORTABLE_STRING:
But val is bool.
Kind regards
Hi Carlos.
Unfortunately this is not a Ladon bug - it seems that the "loads" function in the standard module "json" has a bug (Python 2.7). Using the "parse_constant" keyword seems to have no effect at all.
I have reported the problem: http:// bugs.python. org/issue14692
/ Jakob