Don't log traceback on kb interrupt

contexts
Tyler Goodlet 2019-01-23 20:00:57 -05:00
parent 9f41297298
commit 855f959768
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ class ActorNursery:
# the `else:` block here might not complete? # the `else:` block here might not complete?
# For now, shield both. # For now, shield both.
with trio.open_cancel_scope(shield=True): with trio.open_cancel_scope(shield=True):
if etype is trio.Cancelled: if etype in (trio.Cancelled, KeyboardInterrupt):
log.warning( log.warning(
f"Nursery for {current_actor().uid} was " f"Nursery for {current_actor().uid} was "
f"cancelled with {etype}") f"cancelled with {etype}")