I`ve got this exception when using returnvalue in function
@inlineCallbacks
def my_func(id):
yield somefunc(id)
@inlineCallbacks
def somefunc(id):
somevar = yield func(id)
returnValue(somevar)
returnValue(somevar)
File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 1105, in returnValue
raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return:
The function works fine, but raises an exception. How can i avoid this exception? I just need to return some value from the function.