diff options
author | Yury Selivanov <yury@magic.io> | 2016-09-09 05:01:51 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-09-09 05:01:51 (GMT) |
commit | eb6364557f9bc4e6be29bb8a8f43308a0e080aba (patch) | |
tree | 05b7aed24dce255be67e7a60c021c319d13f43c9 /Lib/asyncio/coroutines.py | |
parent | b96ef55d493aded2dea18b0208070bdfab4ceb73 (diff) | |
download | cpython-eb6364557f9bc4e6be29bb8a8f43308a0e080aba.zip cpython-eb6364557f9bc4e6be29bb8a8f43308a0e080aba.tar.gz cpython-eb6364557f9bc4e6be29bb8a8f43308a0e080aba.tar.bz2 |
Issue #28003: Implement PEP 525 -- Asynchronous Generators.
Diffstat (limited to 'Lib/asyncio/coroutines.py')
-rw-r--r-- | Lib/asyncio/coroutines.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py index 71bc6fb..9c338b0 100644 --- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -276,7 +276,10 @@ def _format_coroutine(coro): try: coro_code = coro.gi_code except AttributeError: - coro_code = coro.cr_code + try: + coro_code = coro.cr_code + except AttributeError: + return repr(coro) try: coro_frame = coro.gi_frame |