py-amqp
py-amqp copied to clipboard
Fix and document return value of basic_consume
Channel.basic_consume() now has 2 return values:
- consumer_tag - when
nowait == False - promise object wen
nowait == True ValueError()whennowait == Trueand user does not specifyconsumer_tag
This is confusing since the API is schizophrenic and returns two different values. Moreover promise object does not have any value to user of library.
I propose that consumer_tag is always returned except the case when ValueError() is raised
Also the return values are not documented.