function returns a coroutine instead a value
franckinux opened this issue · 2 comments
franckinux commented
The get_status method simply return self._status but its definition is async get_status(...).
An async method not containing any await keyword returns a coroutine instead a value.
zzzsochi commented
Everything is a little more complicated.
get_status
decorated by lock_and_status
. Watch this decorator. :-)
franckinux commented
OK,read.
I'm receiving a coroutine instead of a Status object from the get_status
method. This is my point.
Either self._status is returned by _get_status as a coroutine or the
decorator makes the change... Unfortunately, I have no time for
debugging now.
Furthermore, the duration field is a string representing a float. Thus,
an exception is raised in status_from_raw when converting the string to
an int...
Franck
…On 2017-06-04 10:08, Alexander Zelenyak wrote:
Everything is a little more complicated.
get_status decorated by lock_and_status. Watch this decorator. :-)
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [1], or mute the
thread [2].
*
Links:
------
[1] #6 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/AB0GtcpykXF2KPCPEy1imTacSasoeI5gks5sAmYQgaJpZM4NtbSE