Skip to content

Commit

Permalink
Merge branch 'master' into enable-flake8-simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCat467 authored Oct 24, 2023
2 parents 7fffe21 + a0c480a commit e94a1cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trio/_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,10 @@ def from_thread_check_cancelled() -> None:
"""
try:
raise_cancel = PARENT_TASK_DATA.cancel_register[0]
except AttributeError:
except AttributeError as exc:
raise RuntimeError(
"this thread wasn't created by Trio, can't check for cancellation"
)
) from exc
if raise_cancel is not None:
raise_cancel()

Expand Down

0 comments on commit e94a1cb

Please sign in to comment.