ladonize requires rtype
It seems ladonize() requires the presence of 'rtype' even if the function doesn't return anything. As I recall, in gSOAP and soaplib it is possible to have a function not return anything. I tried this in ladon and it didn't work.
I ought to be able to go something like
@ladonize()
def shutdown(self):
pass
and have it work correctly.
Added:
It seems, on first glance, the changes necessary are the following (I am certain there is one last piece having to do with really encoding the output stream):
a) In decorator.py change the following:
# Check the return type
if not validate_
# Raise Arg-type mismatch
raise ReturnTypeMisma
to something like:
# Check the return type
if lni._rtype and not validate_
# Raise Arg-type mismatch
raise ReturnTypeMisma
2) collection.py change
try:
self._rtype = def_kw['rtype']
except KeyError as ke:
# return type must be specified.
raise ReturnTypeUndef
to something like:
You could also add a check in decorator.py to make sure for functions that don't have a rtype they really return None.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- ladon Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Chuck Wegrzyn for more information if necessary.