Skip to content

Commit dfc3eec

Browse files
committed
Extra check on context manager exit
1 parent ccc52e7 commit dfc3eec

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
CHANGES
22
=======
33

4+
1.1.1 (2017-03-11)
5+
------------------
6+
7+
* Extra check on context manager exit
8+
9+
410
1.1.0 (2016-10-20)
511
------------------
612

async_timeout/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33

4-
__version__ = '1.1.0'
4+
__version__ = '1.1.1'
55

66

77
class timeout:
@@ -42,7 +42,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
4242
self._cancel_handler = None
4343
self._task = None
4444
raise asyncio.TimeoutError from None
45-
if self._timeout is not None:
45+
if self._timeout is not None and self._cancel_handler is not None:
4646
self._cancel_handler.cancel()
4747
self._cancel_handler = None
4848
self._task = None

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def read(name):
3131
'Programming Language :: Python :: 3',
3232
'Programming Language :: Python :: 3.4',
3333
'Programming Language :: Python :: 3.5',
34+
'Programming Language :: Python :: 3.6',
3435
'Topic :: Internet :: WWW/HTTP'],
3536
author='Andrew Svetlov',
3637
author_email='[email protected]',

0 commit comments

Comments
 (0)