Skip to content

Commit

Permalink
asycio.Future does not have .exc_info()
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed Mar 22, 2019
1 parent d1c7a32 commit e30865e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

3.21.0
------

- Don't expect asyncio's Futures to have `exc_info()`.

3.20.0
------

Expand Down
2 changes: 1 addition & 1 deletion rejected/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

__author__ = 'Gavin M. Roy <[email protected]>'
__since__ = '2009-09-10'
__version__ = '3.20.0'
__version__ = '3.20.1'

__all__ = [
'__author__',
Expand Down
5 changes: 4 additions & 1 deletion rejected/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,10 @@ def execute(self, message_in, measurement):
exc_info = sys.exc_info()
if concurrent.is_future(result):
error = result.exception()
exc_info = result.exc_info()
try:
exc_info = result.exc_info()
except AttributeError:
pass
self.log_exception('Exception processing delivery %s: %s',
message_in.delivery_tag, str(error),
exc_info=exc_info)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def read_requirements(name):

setuptools.setup(
name='rejected',
version='3.20.0',
version='3.20.1',
description='Rejected is a Python RabbitMQ Consumer Framework and '
'Controller Daemon',
long_description=open('README.rst').read(),
Expand Down

0 comments on commit e30865e

Please sign in to comment.