diff --git a/tractor/_debug.py b/tractor/_debug.py index 1cb29ac..9f8a704 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -126,7 +126,8 @@ class Lock: try: # sometimes the ``trio`` might already be terminated in # which case this call will raise. - cls.local_pdb_complete.set() + if cls.local_pdb_complete is not None: + cls.local_pdb_complete.set() finally: # restore original sigint handler cls.unshield_sigint()