From 90e41016b9c20f88dcd4bb467e40e341259cba63 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 13 Apr 2023 15:18:00 -0400 Subject: [PATCH] Only tuplize `.canceller` if non-`None` --- tractor/_exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tractor/_exceptions.py b/tractor/_exceptions.py index 07f4627..6da2e65 100644 --- a/tractor/_exceptions.py +++ b/tractor/_exceptions.py @@ -74,7 +74,9 @@ class ContextCancelled(RemoteActorError): ''' @property def canceller(self) -> tuple[str, str] | None: - return self.msgdata.get('canceller') + value = self.msgdata.get('canceller') + if value: + return tuple(value) class TransportClosed(trio.ClosedResourceError):