Only tuplize `.canceller` if non-`None`

proper_breakpoint_hooking
Tyler Goodlet 2023-04-13 15:18:00 -04:00
parent 0e81350a42
commit 1ec30577de
1 changed files with 3 additions and 1 deletions

View File

@ -74,7 +74,9 @@ class ContextCancelled(RemoteActorError):
''' '''
@property @property
def canceller(self) -> tuple[str, str] | None: 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): class TransportClosed(trio.ClosedResourceError):