From 5e056bae71950d360c6a2d54cab9f28d5190a16a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 30 Oct 2019 00:32:10 -0400 Subject: [PATCH] Expose trio exceptions to `RemoteActorError` --- tractor/_exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tractor/_exceptions.py b/tractor/_exceptions.py index 0466a73..7ffe4cb 100644 --- a/tractor/_exceptions.py +++ b/tractor/_exceptions.py @@ -5,6 +5,8 @@ import importlib import builtins import traceback +import trio + _this_mod = importlib.import_module(__name__) @@ -14,7 +16,7 @@ class RemoteActorError(Exception): "Remote actor exception bundled locally" def __init__(self, message, type_str, **msgdata): super().__init__(message) - for ns in [builtins, _this_mod]: + for ns in [builtins, _this_mod, trio]: try: self.type = getattr(ns, type_str) break