Skip to content

Commit

Permalink
accept methods as callbacks as well
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
  • Loading branch information
TomasTomecek committed Jan 7, 2019
1 parent c93c6c9 commit 540c3da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fedora_messaging/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def consume(self, callback, bindings=None, queues=None, exchanges=None):
" or a function."
)
self._consumer_callback = cb_obj
elif inspect.isfunction(callback):
elif inspect.isfunction(callback) or inspect.ismethod(callback):
self._consumer_callback = callback
else:
raise ValueError(
Expand Down

0 comments on commit 540c3da

Please sign in to comment.