Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tornado/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def wrapper(*args, **kwargs):
result = ctx_run(func, *args, **kwargs)
except (Return, StopIteration) as e:
result = _value_from_stopiteration(e)
except Exception:
except (Exception, asyncio.CancelledError):
future_set_exc_info(future, sys.exc_info())
try:
return future
Expand All @@ -241,7 +241,7 @@ def wrapper(*args, **kwargs):
future_set_result_unless_cancelled(
future, _value_from_stopiteration(e)
)
except Exception:
except (Exception, asyncio.CancelledError):
future_set_exc_info(future, sys.exc_info())
else:
# Provide strong references to Runner objects as long
Expand Down