Add debug complete event `None`-guard for when already reset

debug_event_guard
Tyler Goodlet 2022-08-23 06:50:56 -04:00
parent 83b44cf469
commit 5ad540c417
1 changed files with 2 additions and 1 deletions

View File

@ -126,6 +126,7 @@ class Lock:
try: try:
# sometimes the ``trio`` might already be terminated in # sometimes the ``trio`` might already be terminated in
# which case this call will raise. # which case this call will raise.
if cls.local_pdb_complete is not None:
cls.local_pdb_complete.set() cls.local_pdb_complete.set()
finally: finally:
# restore original sigint handler # restore original sigint handler