From caa70245e0a489c9e3ddc643d68812c3d15b9b0d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 4 Jul 2021 10:47:15 -0400 Subject: [PATCH] Try remapping all broken errs wholesale on windows --- tractor/_ipc.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tractor/_ipc.py b/tractor/_ipc.py index d6afc33..efe388e 100644 --- a/tractor/_ipc.py +++ b/tractor/_ipc.py @@ -1,6 +1,7 @@ """ Inter-process comms abstractions """ +import platform import typing from typing import Any, Tuple, Optional from functools import partial @@ -13,6 +14,9 @@ from .log import get_logger from ._exceptions import TransportClosed log = get_logger(__name__) + +_is_windows = platform.system() == 'Windows' + # :eyeroll: try: import msgpack_numpy @@ -73,8 +77,9 @@ class MsgpackTCPStream: # nix '[Errno 104]' in msg or - # windows - '[WinError 10054]' in msg + # on windows it seems there are a variety of errors + # to handle.. + _is_windows ): raise TransportClosed( f'{self} was broken with {msg}'