diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-07 21:07:30 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-07 21:07:30 (GMT) |
commit | 6130c0271f00e54fe754f764733668ecda617d51 (patch) | |
tree | 17a45b0e168e91690e48095e8844bf284f814aef /Lib/asyncio | |
parent | 91aa5c12ea1efe9a7bba57d0d4d31a2a182d4fcd (diff) | |
parent | 49d6b8c0c3124e94728dd44aafc33becfb14415b (diff) | |
download | cpython-6130c0271f00e54fe754f764733668ecda617d51.zip cpython-6130c0271f00e54fe754f764733668ecda617d51.tar.gz cpython-6130c0271f00e54fe754f764733668ecda617d51.tar.bz2 |
Merge 3.5 (issue #28634)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/base_futures.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/base_futures.py b/Lib/asyncio/base_futures.py index 64f7845..01259a0 100644 --- a/Lib/asyncio/base_futures.py +++ b/Lib/asyncio/base_futures.py @@ -27,7 +27,8 @@ def isfuture(obj): itself as duck-type compatible by setting _asyncio_future_blocking. See comment in Future for more details. """ - return getattr(obj, '_asyncio_future_blocking', None) is not None + return (hasattr(obj.__class__, '_asyncio_future_blocking') and + obj._asyncio_future_blocking is not None) def _format_callbacks(cb): |